Skip to content

Commit bc24116

Browse files
committed
fix: Model data processing
1 parent 9f684da commit bc24116

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ui/src/api/model/model.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,19 @@ const getSelectModelList: (
3737
data?: ListModelRequest,
3838
loading?: Ref<boolean>,
3939
) => Promise<Result<Array<Model>>> = (data, loading) => {
40-
return get(`${prefix.value}/model_list`, data, loading)
40+
return get(`${prefix.value}/model_list`, data, loading).then((ok) => {
41+
return {
42+
...ok,
43+
data: [
44+
...ok.data.shared_model.map((m: any) => {
45+
return { ...m, type: 'share' }
46+
}),
47+
...ok.data.model.map((m: any) => {
48+
return { ...m, type: 'workspace' }
49+
}),
50+
],
51+
}
52+
})
4153
}
4254

4355
/**

0 commit comments

Comments
 (0)