add comments
This commit is contained in:
1 parent
5dbd8378e2
commit
ffd193437e
3 files changed
+2
-2
No files matched your search
@@ -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);
|
||||
|
||||
@@ -42,7 +42,6 @@ const requestInviteToken = async (userData) => {
|
||||
* @throws {Error} If the invite token is not found or there is another error.
|
||||
*/
|
||||
const getInviteToken = async (token) => {
|
||||
console.log(token);
|
||||
try {
|
||||
const invite = await InviteToken.findOne({
|
||||
token,
|
||||
|
||||
Reference in new issue
Block a user