9 lines
271 B
TypeScript
9 lines
271 B
TypeScript
/** The session is just the staff id in a cookie — one small team, one LAN. */
|
|
export const COOKIE = 'bizmatch_staff';
|
|
|
|
export function staffIdFromRequest(req: {
|
|
cookies: Record<string, string | undefined>;
|
|
}): string | null {
|
|
return req.cookies[COOKIE] ?? null;
|
|
}
|