get confirmed tag/place only

This commit is contained in:
les 2020-08-31 16:51:12 +02:00
parent f9f29154a2
commit 847801033f

View file

@ -24,6 +24,7 @@ const eventController = {
async _getMeta () {
const places = await Place.findAll({
where: { confirmed: true },
order: [[Sequelize.literal('weigth'), 'DESC']],
attributes: {
include: [[Sequelize.fn('count', Sequelize.col('events.placeId')), 'weigth']],
@ -34,6 +35,7 @@ const eventController = {
})
const tags = await Tag.findAll({
where: { confirmed: true },
raw: true,
order: [['weigth', 'DESC']],
attributes: {