From a6eddef2522f62b0d458c79cf5bebb7870eb468e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Mart=C3=ADn?= Date: Tue, 26 Feb 2019 15:05:14 +0100 Subject: [PATCH] same things together --- app/controllers/query_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/query_controller.js b/app/controllers/query_controller.js index e6b24420..8e5f3961 100644 --- a/app/controllers/query_controller.js +++ b/app/controllers/query_controller.js @@ -58,7 +58,6 @@ QueryController.prototype.route = function (app) { // jshint maxcomplexity:21 QueryController.prototype.handleQuery = function (req, res, next) { var self = this; - var sql = res.locals.q; // clone so don't modify req.params or req.body so oauth is not broken var params = _.extend({}, req.query, req.body || {}); var limit = parseInt(params.rows_per_page); @@ -71,6 +70,7 @@ QueryController.prototype.handleQuery = function (req, res, next) { var filename = requestedFilename; var requestedSkipfields = params.skipfields; + let { q: sql } = res.locals; const { user: username, userDbParams: dbopts, authDbParams, userLimits, authorizationLevel } = res.locals; var skipfields;