generated from VLADIMIR/template_frontend
fix
This commit is contained in:
@@ -16,8 +16,13 @@ const permissions = ref<string[]>([])
|
||||
|
||||
async function getPermissions() {
|
||||
permissions.value = []
|
||||
const res = await client.GetPermissions({})
|
||||
permissions.value = res.permissions!
|
||||
try {
|
||||
const res = await client.GetPermissions({})
|
||||
permissions.value = res.permissions || []
|
||||
} catch (err) {
|
||||
message.error('Не удалось загрузить права доступа')
|
||||
console.error('Failed to load permissions:', err)
|
||||
}
|
||||
}
|
||||
|
||||
getPermissions()
|
||||
|
||||
Reference in New Issue
Block a user