Removed unneccesary casts

This commit is contained in:
Jonathan Barrow
2023-03-17 16:18:18 -04:00
parent 9f3d5c4a35
commit e508dd95d4
2 changed files with 6 additions and 6 deletions

View File

@@ -147,7 +147,7 @@ export async function getUserProfileJSONByPID(pid: number): Promise<PNIDProfile>
}));
}
return <PNIDProfile>{
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 <ConnectionResponse>{
return {
app: 'api',
status: 400,
error: 'Invalid or missing connection data'
@@ -233,7 +233,7 @@ export async function addUserConnectionDiscord(pnid: HydratedPNIDDocument, data:
}
});
return <ConnectionResponse>{
return {
app: 'api',
status: 200
};
@@ -253,7 +253,7 @@ export async function removeUserConnectionDiscord(pnid: HydratedPNIDDocument): P
}
});
return <ConnectionResponse>{
return {
app: 'api',
status: 200
};

View File

@@ -200,7 +200,7 @@ export async function decryptToken(token: Buffer): Promise<Buffer> {
export function unpackToken(token: Buffer): Token {
if (token.length <= 14) {
return <Token>{
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 <Token>{
return {
system_type: token.readUInt8(0x0),
token_type: token.readUInt8(0x1),
pid: token.readUInt32LE(0x2),