diff --git a/server/models/trending.js b/server/models/trending.js index 183257e8..13cc9af6 100644 --- a/server/models/trending.js +++ b/server/models/trending.js @@ -65,7 +65,7 @@ module.exports = (sequelize, { BOOLEAN, DATE, FLOAT, INTEGER, STRING }) => { const selectString = 'DISTINCT(claimId), weight'; const whereString = `isChannel = false and time > '${sqlTime}'`; - const query = `SELECT ${selectString} FROM trending WHERE ${whereString} ORDER BY weight DESC LIMIT ${limit}` + const query = `SELECT ${selectString} FROM Trending WHERE ${whereString} ORDER BY weight DESC LIMIT ${limit}` return await sequelize.query(query, { type: sequelize.QueryTypes.SELECT }); }; diff --git a/server/models/views.js b/server/models/views.js index 9c6b15f0..1e6a9769 100644 --- a/server/models/views.js +++ b/server/models/views.js @@ -48,7 +48,7 @@ module.exports = (sequelize, { BOOLEAN, DATE, STRING }) => { const groupString = 'claimId, publisherId, isChannel'; return sequelize.query( - `SELECT ${selectString} FROM views where time > '${sqlTime}' GROUP BY ${groupString}`, + `SELECT ${selectString} FROM Views WHERE time > '${sqlTime}' GROUP BY ${groupString}`, { type: sequelize.QueryTypes.SELECT } ); }