Remove dead code

This commit is contained in:
D. Berge
2020-08-11 19:33:57 +02:00
parent bf1d94b730
commit 09e05388ac

View File

@@ -5,7 +5,9 @@ async function list () {
return res.rows;
}
async function summary (projectId) {
async function summary (projectId, opts = {}) {
await pool.query("CALL set_survey($1);", [projectId]);
// FIXME Make this into a PostgreSQL stored procedure
const text = `
SELECT * FROM projects,
@@ -20,9 +22,6 @@ SELECT * FROM projects,
WHERE current_setting('search_path') LIKE projects.schema||'%';
`;
// FIXME Refactor this
await pool.query("SELECT set_config('search_path', (SELECT schema||',public' FROM public.projects WHERE pid = $1), false);", [projectId]);
const res = await pool.query(text);
return res.rows[0];
}