add footer (#13)
All checks were successful
delpoy / build-and-deploy (push) Successful in 50s

This commit is contained in:
2023-11-30 21:56:08 +01:00
parent f6f9fafc64
commit dd19ff8c15
2 changed files with 19 additions and 1 deletions

View File

@@ -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');
}