diff --git a/src/database.ts b/src/database.ts index 931d181..d5b8c8c 100644 --- a/src/database.ts +++ b/src/database.ts @@ -147,7 +147,7 @@ export async function getUserProfileJSONByPID(pid: number): Promise })); } - return { + return { //accounts: {}, // * We need to figure this out, no idea what these values mean or what they do active_flag: user.get('flags.active') ? 'Y' : 'N', birth_date: user.get('birthdate'), @@ -220,7 +220,7 @@ export async function addUserConnectionDiscord(pnid: HydratedPNIDDocument, data: const valid: joi.ValidationResult = discordConnectionSchema.validate(data); if (valid.error) { - return { + return { app: 'api', status: 400, error: 'Invalid or missing connection data' @@ -233,7 +233,7 @@ export async function addUserConnectionDiscord(pnid: HydratedPNIDDocument, data: } }); - return { + return { app: 'api', status: 200 }; @@ -253,7 +253,7 @@ export async function removeUserConnectionDiscord(pnid: HydratedPNIDDocument): P } }); - return { + return { app: 'api', status: 200 }; diff --git a/src/util.ts b/src/util.ts index f2ca7d6..5269666 100644 --- a/src/util.ts +++ b/src/util.ts @@ -200,7 +200,7 @@ export async function decryptToken(token: Buffer): Promise { export function unpackToken(token: Buffer): Token { if (token.length <= 14) { - return { + return { system_type: token.readUInt8(0x0), token_type: token.readUInt8(0x1), pid: token.readUInt32LE(0x2), @@ -208,7 +208,7 @@ export function unpackToken(token: Buffer): Token { }; } - return { + return { system_type: token.readUInt8(0x0), token_type: token.readUInt8(0x1), pid: token.readUInt32LE(0x2),