From 095e513f9f8f0190322290a7c36e89c9bfbd6808 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 21 May 2021 14:49:59 +0100 Subject: [PATCH] Formatting --- packages/builder/src/components/start/AppCard.svelte | 2 +- packages/server/src/middleware/authorized.js | 2 -- packages/server/src/middleware/builder.js | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/components/start/AppCard.svelte b/packages/builder/src/components/start/AppCard.svelte index 3f38d83dac..c5937c5637 100644 --- a/packages/builder/src/components/start/AppCard.svelte +++ b/packages/builder/src/components/start/AppCard.svelte @@ -65,7 +65,7 @@ {#if app.updatedAt} {processStringSync("Updated {{ duration time 'millisecond' }} ago", { - time: (new Date().getTime() - new Date(app.updatedAt).getTime()) + time: new Date().getTime() - new Date(app.updatedAt).getTime(), })} {:else} Never updated diff --git a/packages/server/src/middleware/authorized.js b/packages/server/src/middleware/authorized.js index 78cd9c1db1..8ed4c41db7 100644 --- a/packages/server/src/middleware/authorized.js +++ b/packages/server/src/middleware/authorized.js @@ -14,8 +14,6 @@ const WEBHOOK_ENDPOINTS = new RegExp( ["webhooks/trigger", "webhooks/schema"].join("|") ) - - module.exports = (permType, permLevel = null) => async (ctx, next) => { // webhooks don't need authentication, each webhook unique if (WEBHOOK_ENDPOINTS.test(ctx.request.url)) { diff --git a/packages/server/src/middleware/builder.js b/packages/server/src/middleware/builder.js index ff03e208b0..4b94580a62 100644 --- a/packages/server/src/middleware/builder.js +++ b/packages/server/src/middleware/builder.js @@ -44,7 +44,7 @@ async function updateAppUpdatedAt(ctx) { const appId = ctx.appId // if debouncing skip this update // get methods also aren't updating - if (await checkDebounce(appId) || ctx.method === "GET") { + if ((await checkDebounce(appId)) || ctx.method === "GET") { return } const db = new CouchDB(appId) @@ -72,4 +72,4 @@ module.exports = async (ctx, permType) => { await checkDevAppLocks(ctx) // set updated at time on app await updateAppUpdatedAt(ctx) -} \ No newline at end of file +}