feat: Block user registration endpoint is registrations are disabled

This commit is contained in:
Jesse Wierzbinski 2023-12-08 18:47:59 -10:00
parent d79e718e15
commit 1d77d80db9
No known key found for this signature in database

View file

@ -36,6 +36,15 @@ export default async (req: Request): Promise<Response> => {
const config = getConfig(); const config = getConfig();
if (!config.signups.registration) {
return jsonResponse(
{
error: "Registration is disabled",
},
422
);
}
const errors: { const errors: {
details: Record< details: Record<
string, string,