From 25692b6b92947b42ebb480b9f15119857c46f788 Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 23 Sep 2021 10:31:59 -0700 Subject: [PATCH] * UserConfig now stores no numbers(all strings) This is to avoid type coercion and loss of precision --- freechat-client/src/types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freechat-client/src/types.ts b/freechat-client/src/types.ts index e960fbe..bb2c83c 100644 --- a/freechat-client/src/types.ts +++ b/freechat-client/src/types.ts @@ -61,15 +61,15 @@ export class ServerConfig { } export class UserConfig { - id: Number + id: String jwt: String|null - permissions: Number + permissions: String secret: String constructor(json: Object) { - this.id = json['id'] + this.id = `${json['id']}` this.jwt = json['jwt'] - this.permissions = json['permissions'] + this.permissions = `${json['permissions']}` this.secret = json['secret'] } }