mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-24 10:15:25 +00:00
Update local state, fix a few more errors
This commit is contained in:
+1
-1
@@ -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": [
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Generated
BIN
Binary file not shown.
+1
-1
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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 }),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user