mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-08 19:37:28 -05:00
Removed unneccesary casts
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user