From 1caa46972b252634e5f41fddb8a6a6e06ba0d302 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Fri, 17 Mar 2023 02:03:30 +0200 Subject: [PATCH] small fix --- package.json | 2 +- src/client.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ff37b08..84e3200 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/client.ts b/src/client.ts index 2663491..cce50c2 100644 --- a/src/client.ts +++ b/src/client.ts @@ -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);