improve login page

This commit is contained in:
sam 2024-09-11 19:13:54 +02:00
parent 4ac0001795
commit 116d0577a7
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
6 changed files with 238 additions and 34 deletions

View file

@ -39,6 +39,8 @@ export default async function serverRequest<T>(
return (await resp.json()) as T;
}
export const getToken = (req: Request) => getCookie(req, "pronounscc-token");
export function getCookie(req: Request, cookieName: string): string | undefined {
const header = req.headers.get("Cookie");
if (!header) return undefined;