mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-09 07:09:57 +03:00
Merge pull request #434 from cg505/issue-433-inverted-invites
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user