Compare commits
2 Commits
e389a3d2f9
...
2fdcc1633d
Author | SHA1 | Date | |
---|---|---|---|
2fdcc1633d | |||
6173dffba3 |
|
@ -7,7 +7,7 @@ import {
|
|||
} from '$env/static/private'
|
||||
|
||||
import PG from '$lib/server/database';
|
||||
// import { building } from '$app/environment';
|
||||
import { building } from '$app/environment';
|
||||
import init_db from '$lib/server/database/init';
|
||||
|
||||
export const POST: RequestHandler = async ({ url, locals }) => {
|
||||
|
@ -17,6 +17,6 @@ export const POST: RequestHandler = async ({ url, locals }) => {
|
|||
return error(401, 'Unauthorized');
|
||||
}
|
||||
|
||||
await init_db(await PG(locals.db));
|
||||
if (!building) await init_db(await PG(locals.db));
|
||||
return new Response(String(token));
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user