fix: use new headscale user api routes
This commit is contained in:
parent
e6580eed2c
commit
774fdb7be2
12 changed files with 250 additions and 252 deletions
|
|
@ -53,6 +53,7 @@ export function getSession(cookie: string | null) {
|
|||
return sessionStorage.getSession(cookie);
|
||||
}
|
||||
|
||||
export type ServerSession = Session<SessionData, SessionFlashData>;
|
||||
export async function auth(request: Request) {
|
||||
if (!sessionStorage) {
|
||||
return false;
|
||||
|
|
@ -64,7 +65,7 @@ export async function auth(request: Request) {
|
|||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return session;
|
||||
}
|
||||
|
||||
export function destroySession(session: Session) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue