fix: initializing git during build
This commit is contained in:
parent
e389a3d2f9
commit
6173dffba3
|
@ -7,7 +7,7 @@ import {
|
||||||
} from '$env/static/private'
|
} from '$env/static/private'
|
||||||
|
|
||||||
import PG from '$lib/server/database';
|
import PG from '$lib/server/database';
|
||||||
// import { building } from '$app/environment';
|
import { building } from '$app/environment';
|
||||||
import init_db from '$lib/server/database/init';
|
import init_db from '$lib/server/database/init';
|
||||||
|
|
||||||
export const POST: RequestHandler = async ({ url, locals }) => {
|
export const POST: RequestHandler = async ({ url, locals }) => {
|
||||||
|
@ -17,6 +17,6 @@ export const POST: RequestHandler = async ({ url, locals }) => {
|
||||||
return error(401, 'Unauthorized');
|
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));
|
return new Response(String(token));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user