mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
feat: Block user registration endpoint is registrations are disabled
This commit is contained in:
parent
d79e718e15
commit
1d77d80db9
|
|
@ -36,6 +36,15 @@ export default async (req: Request): Promise<Response> => {
|
|||
|
||||
const config = getConfig();
|
||||
|
||||
if (!config.signups.registration) {
|
||||
return jsonResponse(
|
||||
{
|
||||
error: "Registration is disabled",
|
||||
},
|
||||
422
|
||||
);
|
||||
}
|
||||
|
||||
const errors: {
|
||||
details: Record<
|
||||
string,
|
||||
|
|
|
|||
Loading…
Reference in a new issue