mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-11 18:51:47 +00:00
Allow signup disabling in account.ts
This commit is contained in:
@ -18,6 +18,9 @@ app.get("/me", authenticate, async (req: Request, res: Response) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.post("/register", async (req: Request, res: Response) => {
|
app.post("/register", async (req: Request, res: Response) => {
|
||||||
|
if (process.env.DISABLE_SIGNUPS === "true")
|
||||||
|
return sendError(res, 400, 1094, "Signups are disabled on this server.");
|
||||||
|
|
||||||
if (validateSchema(res, registerValidation, req.body)) return;
|
if (validateSchema(res, registerValidation, req.body)) return;
|
||||||
|
|
||||||
const account = await createAccount(req.body);
|
const account = await createAccount(req.body);
|
||||||
|
|||||||
Reference in New Issue
Block a user