mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38: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();
|
const config = getConfig();
|
||||||
|
|
||||||
|
if (!config.signups.registration) {
|
||||||
|
return jsonResponse(
|
||||||
|
{
|
||||||
|
error: "Registration is disabled",
|
||||||
|
},
|
||||||
|
422
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const errors: {
|
const errors: {
|
||||||
details: Record<
|
details: Record<
|
||||||
string,
|
string,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue