Skip to content

Commit 45c7920

Browse files
few bugs fixed 🐞
1 parent 8077a49 commit 45c7920

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
export async function GET({ locals }) {
3+
//@ts-ignore
4+
const session = locals.session;
5+
6+
if (!session) {
7+
return new Response('Unauthorized', { status: 401 });
8+
}
9+
10+
return new Response(JSON.stringify(session), { status: 200 });
11+
}
12+

β€Žsrc/routes/users/+server.tsβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
export async function GET({ locals }) {
3+
//@ts-ignore
4+
const session = locals.session;
5+
6+
if (!session) {
7+
return new Response('Unauthorized', { status: 401 });
8+
}
9+
10+
return new Response(JSON.stringify(session), { status: 200 });
11+
}
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
export async function GET({ locals }) {
3+
//@ts-ignore
4+
const session = locals.session;
5+
6+
if (!session) {
7+
return new Response('Unauthorized', { status: 401 });
8+
}
9+
10+
return new Response(JSON.stringify(session), { status: 200 });
11+
}
12+

0 commit comments

Comments
Β (0)