Skip to content

Commit

Permalink
fixed auth required for guild scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurBlanchon committed Feb 21, 2024
2 parents 9013bc7 + a492a43 commit a752e5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mongodb/utils/saveMemberOnJoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default async function saveMemberOnJoin(member, codeUsed) {

//console.log(`member ${member.user.username} joined with invite ${codeUsed ? codeUsed : null}`);

if( memberFromDb?.invite ){
if( memberFromDb ){

if(memberFromDb.leftAtTimestamp){
debug(`removing leftAtTimestamp from ${member.user.username} Member`)
Expand Down
3 changes: 1 addition & 2 deletions routes/invite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ inviteRouter.get('/:code', async function(req, res, next) {

try {
invite = await getInvite(req.params.code, res.locals.user);
await getInvite(req.params.code);
await getInvite();
await getInvite(req.params.code, res.locals.user);
} catch(e) {
console.error(e)
}
Expand Down

0 comments on commit a752e5b

Please sign in to comment.