mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
20 lines
411 B
TypeScript
20 lines
411 B
TypeScript
import type { PageLoad } from './$types.js';
|
|
import { fetchUsuariosAdmin } from '@/hooks/UsuariosAdmin.js';
|
|
|
|
export const ssr = false;
|
|
|
|
export const load: PageLoad = async ({ depends }) => {
|
|
depends('admin:load');
|
|
const result = await fetchUsuariosAdmin(1, 5);
|
|
|
|
if (result.error) {
|
|
return { error: true };
|
|
}
|
|
|
|
return {
|
|
usuarios: result.ret?.usuarios,
|
|
hayMas: result.ret?.hayMas,
|
|
error: false
|
|
};
|
|
};
|