Return the archived project configuration value.

This value indicates whether the project should receive updates
from external sources.
This commit is contained in:
D. Berge
2023-10-29 13:20:02 +01:00
parent c646944886
commit 9136e9655d

View File

@@ -1,7 +1,16 @@
const { setSurvey, pool } = require('../connection');
async function get () {
const res = await pool.query("SELECT pid, name, schema, COALESCE(meta->'groups', '[]'::jsonb) AS groups FROM public.projects;");
const text = `
SELECT
pid,
name,
schema,
COALESCE(meta->'groups', '[]'::jsonb) AS groups,
COALESCE(meta->'archived', 'false'::jsonb) AS archived
FROM public.projects;
`;
const res = await pool.query(text);
return res.rows;
}