From 34fc40521b7a22cd2a6481103811fb643d0e8fa7 Mon Sep 17 00:00:00 2001 From: GLiegard Date: Tue, 28 Apr 2026 12:14:11 +0200 Subject: [PATCH] On function getJobsOfProject, use view view_bojs_with_host to have information about jobs and also the host associated with this job (join perfomed on sessions table). --- middlewares/project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middlewares/project.js b/middlewares/project.js index fbcd461..e93c8f9 100644 --- a/middlewares/project.js +++ b/middlewares/project.js @@ -176,7 +176,7 @@ async function getProjectStatus(req, res, next) { async function getJobsOfProject(req, res, next) { const params = matchedData(req); const { id } = params; - await req.client.query('SELECT * FROM view_jobs WHERE job_id_project=$1', [id]) + await req.client.query('SELECT * FROM view_jobs_with_host WHERE job_id_project=$1', [id]) .then((results) => { req.result = results.rows; }) .catch((error) => { req.error = {