diff --git a/server/api/api/v1/accounts/index.ts b/server/api/api/v1/accounts/index.ts index dc88d581..a0d20fec 100644 --- a/server/api/api/v1/accounts/index.ts +++ b/server/api/api/v1/accounts/index.ts @@ -36,6 +36,15 @@ export default async (req: Request): Promise => { const config = getConfig(); + if (!config.signups.registration) { + return jsonResponse( + { + error: "Registration is disabled", + }, + 422 + ); + } + const errors: { details: Record< string,