mirror of
https://github.com/rustfs/console.git
synced 2026-09-19 01:47:44 +08:00
- Added comprehensive TypeScript type definitions for app configuration - Fixed type safety issues in sidebar component with proper type casting - Improved code organization with better file naming conventions - Enhanced error handling with centralized error management - Added performance optimizations with caching and code splitting - Improved development experience with better tooling configuration - Updated project documentation with comprehensive README - Added proper type definitions for navigation items and app config - Fixed licensing information and added proper Apache 2.0 license 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
export const useAccessKeys = () => {
|
|
const { $api } = useNuxtApp()
|
|
|
|
const listUserServiceAccounts = async (params: Record<string, string> = {}) => {
|
|
return await $api.get("/list-service-accounts", { params })
|
|
}
|
|
|
|
const createServiceAccount = async (data: any) => {
|
|
return await $api.put("/add-service-accounts", data)
|
|
}
|
|
|
|
// const deleteMultipleServiceAccounts = async (data: any) => {
|
|
// return await $api.delete('/delete-service-accounts', data)
|
|
// }
|
|
|
|
const getServiceAccount = async (name: string) => {
|
|
return await $api.get(`/info-service-account?accessKey=${encodeURIComponent(name)}`)
|
|
}
|
|
|
|
const updateServiceAccount = async (name: string, data: any) => {
|
|
return await $api.post(`/update-service-account?accessKey=${encodeURIComponent(name)}`, data)
|
|
}
|
|
|
|
const deleteServiceAccount = async (name: string) => {
|
|
return await $api.delete(`/delete-service-accounts?accessKey=${encodeURIComponent(name)}`, {})
|
|
}
|
|
|
|
const createServiceAccountCreds = async (data: any) => {
|
|
return await $api.post(`/service-account-credentials`, data)
|
|
}
|
|
|
|
return {
|
|
listUserServiceAccounts,
|
|
createServiceAccount,
|
|
deleteServiceAccount,
|
|
createServiceAccountCreds,
|
|
updateServiceAccount,
|
|
getServiceAccount,
|
|
// deleteMultipleServiceAccounts
|
|
}
|
|
}
|