add footer (#13)
All checks were successful
delpoy / build-and-deploy (push) Successful in 50s
All checks were successful
delpoy / build-and-deploy (push) Successful in 50s
This commit is contained in:
@@ -3,6 +3,8 @@ import { error, type RequestHandler } from '@sveltejs/kit';
|
||||
import { Settings, User } from '$lib/server/database';
|
||||
|
||||
export const POST = (async ({ request }) => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
if ((await Settings.findOne({ where: { key: 'register.enabled' } }))?.value === false) {
|
||||
throw error(400, 'Anmeldung geschlossen');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user