module 4
This commit is contained in:
8
src/session.ts
Normal file
8
src/session.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/** 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;
|
||||
}
|
||||
Reference in New Issue
Block a user