From 81717c37f14fc419ffaf6fe2cb8b659161879252 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Fri, 22 Aug 2025 00:02:05 +0200 Subject: [PATCH] Add option to return project timestamp --- lib/www/server/lib/db/project/get.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/www/server/lib/db/project/get.js b/lib/www/server/lib/db/project/get.js index 3ecc944..99f4982 100644 --- a/lib/www/server/lib/db/project/get.js +++ b/lib/www/server/lib/db/project/get.js @@ -1,8 +1,14 @@ const { setSurvey, pool } = require('../connection'); -async function get () { +async function get (opts = {}) { + + const select = opts.timestamps + ? "last_project_update(pid) tstamp," + : ""; + const text = ` SELECT + ${select} pid, name, schema,