small fix

master
Tudor Stanciu 2023-03-17 02:03:30 +02:00
parent 8449a3a14e
commit 1caa46972b
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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);