templates2.Booking.Nuxt/server/utils/guard.ts
w4c-templates 3491e2d39c
Some checks failed
CI / quality (push) Has been cancelled
chore(template): publish Booking.Nuxt
2026-10-11 23:27:22 +03:00

12 lines
478 B
TypeScript

import type { NitroEvent } from './h3-event';
import { requireAdmin, type SessionUser } from './auth';
/**
* API guard for booking administration (services, staff, bookings).
* The booking domain has a single privileged role — `admin` — so this is a thin, explicit wrapper
* around `requireAdmin` that the domain routes import instead of reaching into the core.
*/
export function requireStaff(event: NitroEvent): Promise<SessionUser> {
return requireAdmin(event);
}