mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: update apiType logic to handle shared route and adjust systemType in tool list request
--bug=1064304 --user=刘瑞斌 【共享资源】共享的工作流知识库编排中,可以使用工作空间下的工具 https://www.tapd.cn/62980211/s/1808141 --bug=1064306 --user=刘瑞斌 【共享资源】共享的工作流知识库中,无法使用没有授权到工作空间的共享工具 https://www.tapd.cn/62980211/s/1808143
This commit is contained in:
parent
752a4d95c3
commit
e97ded9dc7
|
|
@ -154,7 +154,9 @@ const props = defineProps({
|
|||
const emit = defineEmits(['clickNodes', 'onmousedown'])
|
||||
|
||||
const apiType = computed(() => {
|
||||
if (route.path.includes('resource-management')) {
|
||||
if (route.path.includes('shared')) {
|
||||
return 'systemShare'
|
||||
} else if (route.path.includes('resource-management')) {
|
||||
return 'systemManage'
|
||||
} else {
|
||||
return 'workspace'
|
||||
|
|
@ -237,7 +239,7 @@ async function getToolList() {
|
|||
const res = await loadSharedApi({
|
||||
type: 'tool',
|
||||
isShared: folder.currentFolder?.id === 'share',
|
||||
systemType: 'workspace',
|
||||
systemType: apiType.value,
|
||||
}).getToolList({
|
||||
folder_id: folder.currentFolder?.id || user.getWorkspaceId(),
|
||||
tool_type: activeName.value == 'DATA_SOURCE_TOOL' ? 'DATA_SOURCE' : 'CUSTOM',
|
||||
|
|
|
|||
|
|
@ -112,7 +112,9 @@ const props = defineProps<{ nodeModel: any }>()
|
|||
const route = useRoute()
|
||||
|
||||
const apiType = computed(() => {
|
||||
if (route.path.includes('resource-management')) {
|
||||
if (route.path.includes('shared')) {
|
||||
return 'systemShare'
|
||||
} else if (route.path.includes('resource-management')) {
|
||||
return 'systemManage'
|
||||
} else {
|
||||
return 'workspace'
|
||||
|
|
|
|||
Loading…
Reference in New Issue