12 lines
478 B
TypeScript
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);
|
|
}
|