autocomplete for promoted text labels

This commit is contained in:
azivner
2018-08-06 22:52:49 +02:00
parent 90e9297ec5
commit d3e44b37e9
2 changed files with 21 additions and 1 deletions

View File

@@ -138,7 +138,7 @@ async function getAttributeNames(req) {
async function getValuesForAttribute(req) {
const attributeName = req.params.attributeName;
return await sql.getColumn("SELECT DISTINCT value FROM attributes WHERE isDeleted = 0 AND name = ? AND value != '' ORDER BY value", [attributeName]);
return await sql.getColumn("SELECT DISTINCT value FROM attributes WHERE isDeleted = 0 AND name = ? AND type = 'label' AND value != '' ORDER BY value", [attributeName]);
}
module.exports = {