From 67f2a85abd27dcbc1fdf296b5304bb59aa28b5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 15 Feb 2018 12:30:04 +0100 Subject: [PATCH] Add database credentials to jobs --- app/controllers/job_controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/job_controller.js b/app/controllers/job_controller.js index 4b13b1bc..86e3cd26 100644 --- a/app/controllers/job_controller.js +++ b/app/controllers/job_controller.js @@ -80,7 +80,11 @@ JobController.prototype.createJob = function (req, res) { var data = { user: res.locals.user, query: sql, - host: res.locals.userDbParams.host + host: res.locals.userDbParams.host, + port: res.locals.userDbParams.port, + pass: res.locals.userDbParams.pass, + dbname: res.locals.userDbParams.dbname, + dbuser: res.locals.userDbParams.user }; this.jobService.create(data, jobResponse(req, res, this.statsdClient, 'create', 201));