db case issues
This commit is contained in:
parent
a305fd0190
commit
3359484b15
|
|
@ -134,15 +134,16 @@ const Notification = sequelize.define('Notification', {
|
|||
}, {
|
||||
tableName: 'notifications',
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
indexes: [
|
||||
{
|
||||
fields: ['user_id', 'createdAt']
|
||||
fields: ['user_id', 'created_at']
|
||||
},
|
||||
{
|
||||
fields: ['type', 'status']
|
||||
},
|
||||
{
|
||||
fields: ['group_id', 'createdAt']
|
||||
fields: ['group_id', 'created_at']
|
||||
},
|
||||
{
|
||||
fields: ['status', 'scheduled_for']
|
||||
|
|
@ -209,7 +210,7 @@ Notification.getRecent = async function(userId, limit = 20) {
|
|||
|
||||
return await this.findAll({
|
||||
where: { user_id: userId },
|
||||
order: [['createdAt', 'DESC']],
|
||||
order: [['created_at', 'DESC']],
|
||||
limit: limit,
|
||||
include: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue