add comments

This commit is contained in:
Alex Holliday committed 2024-09-25 15:14:22 +08:00
1 parent 5dbd8378e2
commit ffd193437e
3 files changed
+2 -2

No files matched your search

+1
View File
@@ -52,6 +52,7 @@ const registerController = async (req, res, next) => {
// Create a new user
try {
const { inviteToken } = req.body;
// If superAdmin exists, a token should be attached to all further register requests
const superAdminExists = await req.db.checkSuperadmin(req, res);
if (superAdminExists) {
await req.db.getInviteTokenAndDelete(inviteToken);