Fix case sentitivity in some instances

This commit is contained in:
Shawn 2018-10-24 16:21:50 -05:00
parent 74f6c1fefa
commit d625d9b76a
2 changed files with 2 additions and 2 deletions

View file

@ -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 });
};

View file

@ -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 }
);
}