mirror of
https://github.com/psforever/PSFPortal.git
synced 2026-04-28 07:45:24 +00:00
Disable registration
This commit is contained in:
parent
d36fbbde9a
commit
3c5482a4c7
3 changed files with 7 additions and 1 deletions
|
|
@ -7,7 +7,10 @@ api.post('/register', async (req, res, next) => {
|
|||
const rUsername = req.body.username;
|
||||
const rPassword = req.body.password;
|
||||
const rEmail = req.body.email; // TODO: validate email regex
|
||||
|
||||
// TODO: recaptcha, csrf protection
|
||||
res.status(403).json({message: "Registration is disabled"});
|
||||
return;
|
||||
|
||||
if (!rUsername || !rPassword || !rEmail) {
|
||||
res.status(400).json({message: "missing fields"});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue