From 0f049fbb949e8182cb3e845b1e588758744c33eb Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 7 Apr 2021 18:13:10 +1200 Subject: [PATCH] Improved query formatting refs https://github.com/TryGhost/Team/issues/599 - Oneliners with lots of chained commands are hardly readable on small screens --- ghost/limit-service/lib/config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghost/limit-service/lib/config.js b/ghost/limit-service/lib/config.js index 4c37d967f3..51171344af 100644 --- a/ghost/limit-service/lib/config.js +++ b/ghost/limit-service/lib/config.js @@ -23,7 +23,11 @@ module.exports = { }, customIntegrations: { currentCountQuery: async (db) => { - let result = await db.knex('integrations').count('id', {as: 'count'}).whereNotIn('type', ['internal', 'builtin']).first(); + let result = await db.knex('integrations') + .count('id', {as: 'count'}) + .whereNotIn('type', ['internal', 'builtin']) + .first(); + return result.count; } },