Skip to content

Commit

Permalink
fix api reads
Browse files Browse the repository at this point in the history
  • Loading branch information
NoodleOfDeath committed Jan 29, 2024
1 parent 0ab2341 commit c827fc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/src/api/v1/schema/user/User.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,11 @@ export class User<A extends UserAttributes = UserAttributes, B extends UserCreat
['targetId', 'desc'],
],
where: {
revert: false,
type: 'read',
userId: this.id,
},
})).filter((i) => i.revert === false).map((i) => [i.targetId, i.createdAt]));
})).map((i) => [i.targetId, i.createdAt]));
profile.preferences.removedSummaries = Object.fromEntries((await SummaryInteraction.findAll({
attributes: ['targetId', [fn('max', col('summary_interaction.createdAt')), 'createdAt']],
group: ['targetId'],
Expand Down

0 comments on commit c827fc3

Please sign in to comment.