From 515e11a06411d57cf4340ef092fcb240fa4ebb66 Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Sun, 10 Nov 2019 18:32:50 -0500 Subject: [PATCH] Reformatted the latest PRs --- package.json | 8 ++++---- src/datastore/AppsDataStore.ts | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 743a6d5..d99324c 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,11 @@ "private": true, "scripts": { "start": "node ./bin/www", - "dev": "echo 'RECOMPILING' && npx madge --circular --extensions ts ./ && rm -rf ./built && npx tsc && sudo ./dev-scripts/dev-reset-service.sh", - "clean": "sudo ./dev-scripts/dev-clean-run-as-dev.sh", + "dev": "npm run build && sudo ./dev-scripts/dev-reset-service.sh", + "clean": "npm run build && sudo ./dev-scripts/dev-clean-run-as-dev.sh", "tslint": "tslint -c tslint.json -p tsconfig.json", - "build": "rm -rf ./built && npx tsc", - "test": "rm -rf ./built && npx tsc && jest" + "build": "echo 'RECOMPILING' && npx madge --circular --extensions ts ./ && rm -rf ./built && npx tsc", + "test": "npm run build && jest" }, "dependencies": { "@types/bcryptjs": "^2.4.2", diff --git a/src/datastore/AppsDataStore.ts b/src/datastore/AppsDataStore.ts index 2d1f5d6..1cdc6d0 100644 --- a/src/datastore/AppsDataStore.ts +++ b/src/datastore/AppsDataStore.ts @@ -228,16 +228,18 @@ class AppsDataStore { return self.getAppDefinition(oldAppName) }) .then(function(appData) { - if (appData.appPushWebhook && appData.appPushWebhook.pushWebhookToken) { + if ( + appData.appPushWebhook && + appData.appPushWebhook.pushWebhookToken + ) { const tokenVersion = uuid() - return authenticator.getAppPushWebhookToken( - newAppName, - tokenVersion - ).then((val) => { - appData.appPushWebhook!.pushWebhookToken = val - appData.appPushWebhook!.tokenVersion = tokenVersion - return appData - }) + return authenticator + .getAppPushWebhookToken(newAppName, tokenVersion) + .then(val => { + appData.appPushWebhook!.pushWebhookToken = val + appData.appPushWebhook!.tokenVersion = tokenVersion + return appData + }) } return appData