Private
Public Access
algunos refactors y arregle el tema de que no se eliminaban los
subgrupos
This commit is contained in:
1 parent
ab88be0ba5
commit
df2412f29a
25 files changed
+415
-261
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { obtenerGrupos, obtenerPermisos } from '$lib/api';
|
||||
import type { Grupo, Permiso } from '../../types';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
let grupos: Grupo[] = [];
|
||||
let permisos: Permiso[] = [];
|
||||
|
||||
try {
|
||||
grupos = await obtenerGrupos(fetch);
|
||||
} catch {
|
||||
// token might not be available on server
|
||||
}
|
||||
|
||||
try {
|
||||
permisos = await obtenerPermisos(fetch);
|
||||
} catch {
|
||||
// token might not be available on server
|
||||
}
|
||||
|
||||
return { grupos, permisos };
|
||||
};
|
||||
Reference in new issue
Block a user