Signup working with new db

This commit is contained in:
metacryst
2025-11-23 22:16:53 -06:00
parent c3ed5ac5ac
commit 8c7ed68975
8 changed files with 98 additions and 67 deletions

View File

@@ -43,11 +43,11 @@ class Server {
next()
}
newUserSubmission = (req, res) => {
newUserSubmission = async (req, res) => {
const { token } = req.query;
try {
db.members.add(req.body)
return res.redirect(`/signin/?new=true`);
await db.members.add(req.body)
return res.status(200).json({});
} catch(e) {
return res.status(e.status).json({ error: 'Error adding new member' });
}