fix(frontend): auto-attach admin api keys and normalize admin list payloads
This commit is contained in:
@@ -145,8 +145,12 @@ async function loadGroups() {
|
||||
loadingGroups.value = true
|
||||
try {
|
||||
const res = await getPermissionGroups()
|
||||
groups.value = res.data || []
|
||||
groups.value = res.data?.items || []
|
||||
} catch (err) {
|
||||
if (err.response?.status === 422) {
|
||||
ElMessage.error('缺少管理員 API 認證,請檢查前端 .env.development')
|
||||
return
|
||||
}
|
||||
ElMessage.error('載入群組失敗')
|
||||
} finally {
|
||||
loadingGroups.value = false
|
||||
|
||||
Reference in New Issue
Block a user