mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:57:08 +00:00
Labels can be associated with events and can have display properties such as a description and colour, this is why we need an endpoint for the client to retrieve them.
17 lines
290 B
JavaScript
17 lines
290 B
JavaScript
const { pool } = require('../connection');
|
|
|
|
async function list (projectId, opts = {}) {
|
|
await pool.query("CALL set_survey($1);", [projectId]);
|
|
|
|
const text = `
|
|
SELECT *
|
|
FROM labels
|
|
ORDER BY name;
|
|
`;
|
|
|
|
const res = await pool.query(text);
|
|
return res.rows;
|
|
}
|
|
|
|
module.exports = list;
|