summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-07-18 18:46:45 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commit1bb16b76ac61c20c09b60e6641c2c292e5be4c81 (patch)
tree5e10b95f119b70759753f64044d5b589e3d0b024
parentreplace all var with let (reduces warnings) (diff)
downloadserver-1bb16b76ac61c20c09b60e6641c2c292e5be4c81.tar.xz
Update local state, fix a few more errors
-rw-r--r--api/package.json2
-rw-r--r--gateway/package.json2
-rw-r--r--gateway/src/opcodes/Identify.ts2
-rw-r--r--package-lock.json13
-rw-r--r--util/package.json2
-rw-r--r--util/src/entities/Member.ts4
6 files changed, 13 insertions, 12 deletions
diff --git a/api/package.json b/api/package.json
index b46e5f3d..b34f1b30 100644
--- a/api/package.json
+++ b/api/package.json
@@ -93,7 +93,7 @@
 		"picocolors": "^1.0.0",
 		"proxy-agent": "^5.0.0",
 		"supertest": "^6.1.6",
-		"typeorm": "^0.2.37"
+		"typeorm": "^0.2.45"
 	},
 	"jest": {
 		"setupFiles": [
diff --git a/gateway/package.json b/gateway/package.json
index 0524cc40..a062ac9b 100644
--- a/gateway/package.json
+++ b/gateway/package.json
@@ -34,7 +34,7 @@
 		"missing-native-js-functions": "^1.2.18",
 		"node-fetch": "^2.6.2",
 		"proxy-agent": "^5.0.0",
-		"typeorm": "^0.2.37",
+		"typeorm": "^0.2.45",
 		"ws": "^7.4.2"
 	},
 	"optionalDependencies": {
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts
index 31d2ae33..2559624e 100644
--- a/gateway/src/opcodes/Identify.ts
+++ b/gateway/src/opcodes/Identify.ts
@@ -41,7 +41,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 
 	try {
 		const { jwtSecret } = Config.get().security;
-		let { decoded } = await checkToken(identify.token, jwtSecret); // will throw an error if invalid
+		var { decoded } = await checkToken(identify.token, jwtSecret); // will throw an error if invalid
 	} catch (error) {
 		console.error("invalid token", error);
 		return this.close(CLOSECODES.Authentication_failed);
diff --git a/package-lock.json b/package-lock.json
index 9aacf440..11edcc9c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -49,7 +49,7 @@
 				"picocolors": "^1.0.0",
 				"proxy-agent": "^5.0.0",
 				"supertest": "^6.1.6",
-				"typeorm": "^0.2.37"
+				"typeorm": "^0.2.45"
 			},
 			"devDependencies": {
 				"@babel/core": "^7.15.5",
@@ -156,7 +156,7 @@
 				"missing-native-js-functions": "^1.2.18",
 				"node-fetch": "^2.6.2",
 				"proxy-agent": "^5.0.0",
-				"typeorm": "^0.2.37",
+				"typeorm": "^0.2.45",
 				"ws": "^7.4.2"
 			},
 			"devDependencies": {
@@ -12370,7 +12370,7 @@
 				"picocolors": "^1.0.0",
 				"proxy-agent": "^5.0.0",
 				"reflect-metadata": "^0.1.13",
-				"typeorm": "^0.2.38",
+				"typeorm": "^0.2.45",
 				"typescript": "^4.4.2",
 				"typescript-json-schema": "^0.50.1"
 			},
@@ -14650,6 +14650,7 @@
 				"missing-native-js-functions": "^1.2.18",
 				"morgan": "^1.10.0",
 				"multer": "^1.4.2",
+				"node-2fa": "^2.0.3",
 				"node-fetch": "^2.6.2",
 				"patch-package": "^6.4.7",
 				"picocolors": "^1.0.0",
@@ -14658,7 +14659,7 @@
 				"ts-node": "^9.1.1",
 				"ts-node-dev": "^1.1.6",
 				"ts-patch": "^1.4.4",
-				"typeorm": "^0.2.37",
+				"typeorm": "^0.2.45",
 				"typescript": "^4.4.2",
 				"typescript-json-schema": "0.50.1"
 			}
@@ -14739,7 +14740,7 @@
 				"proxy-agent": "^5.0.0",
 				"ts-node-dev": "^1.1.6",
 				"ts-patch": "^1.4.4",
-				"typeorm": "^0.2.37",
+				"typeorm": "^0.2.45",
 				"typescript": "^4.2.3",
 				"ws": "^7.4.2"
 			}
@@ -14766,7 +14767,7 @@
 				"proxy-agent": "^5.0.0",
 				"reflect-metadata": "^0.1.13",
 				"ts-node": "^10.2.1",
-				"typeorm": "^0.2.38",
+				"typeorm": "^0.2.45",
 				"typescript": "^4.4.2",
 				"typescript-json-schema": "^0.50.1"
 			},
diff --git a/util/package.json b/util/package.json
index 587e8a14..246ec6b6 100644
--- a/util/package.json
+++ b/util/package.json
@@ -50,7 +50,7 @@
 		"picocolors": "^1.0.0",
 		"proxy-agent": "^5.0.0",
 		"reflect-metadata": "^0.1.13",
-		"typeorm": "^0.2.38",
+		"typeorm": "^0.2.45",
 		"typescript": "^4.4.2",
 		"typescript-json-schema": "^0.50.1"
 	},
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index fe2d5590..0194c9a9 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -155,7 +155,7 @@ export class Member extends BaseClassWithoutId {
 			Member.findOneOrFail({
 				where: { id: user_id, guild_id },
 				relations: ["user", "roles"], // we don't want to load  the role objects just the ids
-				select: ["index", "roles.id"],
+				select: ["index"],
 			}),
 			Role.findOneOrFail({ where: { id: role_id, guild_id }, select: ["id"] }),
 		]);
@@ -181,7 +181,7 @@ export class Member extends BaseClassWithoutId {
 			Member.findOneOrFail({
 				where: { id: user_id, guild_id },
 				relations: ["user", "roles"], // we don't want to load  the role objects just the ids
-				select: ["roles.id", "index"],
+				select: ["index"],
 			}),
 			await Role.findOneOrFail({ id: role_id, guild_id }),
 		]);