Files
rustfs-console/composables/usePools.ts
T
overtrue 6ab024be1c style: format code with Prettier
- Auto-format all files to comply with Prettier rules
- Fix code style issues in 545 files
2025-11-01 00:03:01 +08:00

24 lines
545 B
TypeScript

export const usePools = () => {
const { $api } = useNuxtApp()
return {
// 存储池列表
async getPoolsList() {
return await $api.get('/pools/list')
},
// 存储池状态
async getPoolsStatus() {
return await $api.get('/pools/status')
},
// 存储池下线
async offlinePool(pool: string) {
return await $api.post('/pools/decommission', { pool })
},
// 取消下线
async cancelOfflinePool(pool: string) {
return await $api.post('/pools/cancel', { pool })
},
}
}