Commented out admin check, unsure as to whether or not more than one admin can exist
This commit is contained in:
1 parent
c77414f2d7
commit
608153b461
6 files changed
+23
-23
No files matched your search
@@ -172,6 +172,7 @@ const getAllUsers = async (req, res) => {
|
||||
|
||||
const requestInviteToken = async (req, res) => {
|
||||
try {
|
||||
console.log(req.body.role);
|
||||
await InviteToken.deleteMany({ email: req.body.email });
|
||||
let inviteToken = new InviteToken({
|
||||
email: req.body.email,
|
||||
@@ -188,7 +189,7 @@ const requestInviteToken = async (req, res) => {
|
||||
const getInviteToken = async (req, res) => {
|
||||
try {
|
||||
console.log(req.body.token);
|
||||
const invite = await InviteToken.findOneAndDelete({
|
||||
const invite = await InviteToken.findOne({
|
||||
token: req.body.token,
|
||||
});
|
||||
if (invite === null) {
|
||||
|
||||
Reference in new issue
Block a user