fix inverted INVITE conditional

This commit is contained in:
Christopher Cooper
2021-11-15 23:11:22 -08:00
parent dd91abae0d
commit edf45c8790
@@ -226,7 +226,7 @@ router.post(
try {
const userID = await GetNextCounterValue("users");
if (!ServerConfig.INVITE_CODE_CONFIG) {
if (ServerConfig.INVITE_CODE_CONFIG) {
const inviteCodeDoc = await db.invites.findOneAndUpdate(
{
code: req.body.inviteCode,
@@ -292,7 +292,7 @@ router.post(
} catch (err) {
logger.error(`Bailed on user creation ${req.body.username}.`, { err });
if (!ServerConfig.INVITE_CODE_CONFIG) {
if (ServerConfig.INVITE_CODE_CONFIG) {
await ReinstateInvite(req.body.inviteCode);
}