small fix
parent
8449a3a14e
commit
1caa46972b
|
@ -10,7 +10,7 @@
|
|||
"format": "prettier --write \"src/**/*.ts\"",
|
||||
"lint": "tslint -p tsconfig.json",
|
||||
"prepublishOnly": "npm test && npm run lint",
|
||||
"prepush": "npm run build",
|
||||
"prepush": "npm install && npm run build",
|
||||
"preversion": "npm run lint",
|
||||
"version": "npm run format && git add -A src",
|
||||
"push": "npm publish",
|
||||
|
|
|
@ -47,7 +47,7 @@ class TuitioClient {
|
|||
const response = await request(url, "post");
|
||||
if (!response.error) {
|
||||
const currentDate = new Date();
|
||||
const expiresIn = response.result.expiresIn - 10000; //10 seconds of safety margin
|
||||
const expiresIn = response.result.expiresIn - 10000; // 10 seconds of safety margin
|
||||
const validUntil = new Date(currentDate.getTime() + expiresIn);
|
||||
const authData = { token: response.result.token, validUntil, userName };
|
||||
setItem(storageKeys.AUTH_DATA, authData);
|
||||
|
|
Loading…
Reference in New Issue