import "server-only"; import { getCurrentUser } from "./auth"; /** * Compatibility shim. The app used to seed a single operator and * attribute everything to it; now we have real auth + roles. Existing * call sites read `.id` and `.defaultTimezone` off the returned * object — both are still present on the AuthUser shape, so the * swap is mechanical and existing tests that mock @/lib/operator * keep working unchanged. * * New code should call getCurrentUser / requireUser / requireAdmin * from @/lib/auth directly. */ export async function getSeededOperator() { const u = await getCurrentUser(); if (!u) { throw new Error("Not authenticated"); } return u; }