Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement-15713][api]DataSource And UdfFunc list query use Enum code value rather than ordinal #15714

Merged
merged 7 commits into from
Apr 9, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public Result<Object> queryDataSource(@Parameter(hidden = true) @RequestAttribut
@ApiException(QUERY_DATASOURCE_ERROR)
public Result<Object> queryDataSourceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("type") DbType type) {
List<DataSource> datasourceList = dataSourceService.queryDataSourceList(loginUser, type.ordinal());
List<DataSource> datasourceList = dataSourceService.queryDataSourceList(loginUser, type.getCode());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall LGTM, please update the related UT

return Result.success(datasourceList);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public Result<Object> queryUdfFuncListPaging(@Parameter(hidden = true) @RequestA
@ApiException(QUERY_DATASOURCE_BY_TYPE_ERROR)
public Result<Object> queryUdfFuncList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("type") UdfType type) {
return udfFuncService.queryUdfFuncList(loginUser, type.ordinal());
return udfFuncService.queryUdfFuncList(loginUser, type.getCode());
}

/**
Expand Down
Loading