mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:27:08 +00:00
Remove dead code
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user