Added method for tags by region id

This commit is contained in:
Timo John 2020-06-25 15:49:14 +02:00
parent cc64fb1c32
commit c1198c98db

View File

@ -7,7 +7,16 @@ exports.getUniqueTags = async (dbConn) => {
exports.allTagsWithValues = async (dbConn) => {
let tags = await dbConn.query(
`SELECT * FROM region_feedback;`
`SELECT region_id, name, value FROM region_feedback;`
);
return tags;
};
exports.getTagsByRegionId = async (dbConn, id) => {
let tags = await dbConn.query(
`SELECT region_id, name, value
FROM region_feedback
WHERE region_id = ${id};`
);
return tags;
};