Skip to content

Commit 8e3f68f

Browse files
authored
fix basemodeltype api (#131)
* fix basemodeltype api * auto prettier format code
1 parent 403df58 commit 8e3f68f

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

src/stores/modelStatus.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,19 @@ export const modelStore = defineStore('modelStore', {
160160
this.modelListPathParams.current = page
161161
},
162162
async getModelTypes() {
163-
const mt = await model_types()
164-
const bmt = await get_all_dict()
165-
this.typeLis = mt.data
166-
this.baseTypeLis = bmt.data.base_models
163+
try {
164+
const [mt, bmt] = await Promise.all([model_types(), get_all_dict()])
165+
166+
if (mt?.data) {
167+
this.typeLis = mt.data
168+
}
169+
170+
if (bmt?.data?.base_models) {
171+
this.baseTypeLis = bmt.data.base_models
172+
}
173+
} catch (error) {
174+
console.error('Failed to fetch model types:', error)
175+
}
167176
}
168177
}
169178
})

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.62
1+
1.2.63

0 commit comments

Comments
 (0)