summary refs log tree commit diff
path: root/util/src/entities/Invite.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-06 18:25:30 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commitcba3844c6f7a6b26c93d8061da0ca7fe6b291e92 (patch)
tree515a4000f4d26ab1999644b9dd6a057e03041bcf /util/src/entities/Invite.ts
parentmigrate to DataSource (diff)
downloadserver-cba3844c6f7a6b26c93d8061da0ca7fe6b291e92.tar.xz
Resolve changes undone by rebasing from master
Diffstat (limited to 'util/src/entities/Invite.ts')
-rw-r--r--util/src/entities/Invite.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/src/entities/Invite.ts b/util/src/entities/Invite.ts
index 6ac64ddc..b672caf7 100644
--- a/util/src/entities/Invite.ts
+++ b/util/src/entities/Invite.ts
@@ -75,7 +75,7 @@ export class Invite extends BaseClassWithoutId {
 	vanity_url?: boolean;
 
 	static async joinGuild(user_id: string, code: string) {
-		const invite = await Invite.findOneOrFail({ code });
+		const invite = await Invite.findOneOrFail({ where: { code } });
 		if (invite.uses++ >= invite.max_uses && invite.max_uses !== 0) await Invite.delete({ code });
 		else await invite.save();