Skip to content

Commit 19db927

Browse files
committed
stopping disabled templates to be returned in response of list endpoints.
1 parent 7deeec1 commit 19db927

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/routes/metadata/list.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ function getUsedModel() {
2727
priceConfig: { },
2828
};
2929
const query = {
30+
where: {
31+
deletedAt: { $eq: null },
32+
disabled: false,
33+
},
3034
attributes: { exclude: ['deletedAt', 'deletedBy'] },
3135
raw: true,
3236
};

src/routes/productTemplates/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = [
1414
if (!util.isValidFilter(filters, ['productKey'])) {
1515
return util.handleError('Invalid filters', null, req, next);
1616
}
17-
const where = { deletedAt: { $eq: null } };
17+
const where = { deletedAt: { $eq: null }, disabled: false };
1818
if (filters.productKey) {
1919
where.productKey = { $eq: filters.productKey };
2020
}

src/routes/projectTemplates/list.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = [
1212
(req, res, next) => models.ProjectTemplate.findAll({
1313
where: {
1414
deletedAt: { $eq: null },
15+
disabled: false,
1516
},
1617
attributes: { exclude: ['deletedAt', 'deletedBy'] },
1718
raw: true,

0 commit comments

Comments
 (0)