Skip to content

Commit 97ec1b2

Browse files
committed
refactor: 简化 getConnectInfo 函数的代码结构
1 parent 2d84333 commit 97ec1b2

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

web/src/stores/connect.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ export const useConnectStore = defineStore('connectStore', () => {
2525
}
2626

2727
async function getConnectInfo() {
28-
await fetchGetAllConnectInfo()
29-
.then((res) => {
30-
if (res.code === 1) {
31-
connectsInfo.value = res.data
32-
}
33-
})
28+
await fetchGetAllConnectInfo().then((res) => {
29+
if (res.code === 1) {
30+
connectsInfo.value = res.data
31+
}
32+
})
3433
}
3534

3635
return {

0 commit comments

Comments
 (0)