Skip to content

Commit 5f2bb37

Browse files
committed
refactor: update workspace_ids handling in API requests for consistency
1 parent 60e3005 commit 5f2bb37

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ui/src/views/system-resource-management/KnowledgeResourceIndex.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ function getList() {
193193
const params = {
194194
[search_type.value]: search_form.value[search_type.value],
195195
}
196+
if (workspaceArr.value.length > 0) {
197+
params.workspace_ids = JSON.stringify(workspaceArr.value)
198+
}
196199
KnowledgeResourceApi.getKnowledgeListPage(paginationConfig, params, loading).then((res: any) => {
197200
paginationConfig.total = res.data?.total
198201
knowledgeList.value = res.data?.records

ui/src/views/system-resource-management/ToolResourceIndex.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ function getList() {
215215
const params = {
216216
[search_type.value]: search_form.value[search_type.value],
217217
}
218+
if (workspaceArr.value.length > 0) {
219+
params.workspace_ids = JSON.stringify(workspaceArr.value)
220+
}
218221
ToolResourceApi.getToolListPage(paginationConfig, params, loading).then((res) => {
219222
paginationConfig.total = res.data?.total
220223
toolList.value = res.data?.records

0 commit comments

Comments
 (0)