mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
perf(server): reduce db query when get notifications
This commit is contained in:
parent
3cac8e0f6f
commit
475cee9029
1 changed files with 2 additions and 0 deletions
|
@ -70,6 +70,8 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
.andWhere(`notification.notifieeId = :meId`, { meId: user.id })
|
||||
.leftJoinAndSelect('notification.notifier', 'notifier')
|
||||
.leftJoinAndSelect('notification.note', 'note')
|
||||
.leftJoinAndSelect('notifier.avatar', 'notifierAvatar')
|
||||
.leftJoinAndSelect('notifier.banner', 'notifierBanner')
|
||||
.leftJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('user.avatar', 'avatar')
|
||||
.leftJoinAndSelect('user.banner', 'banner')
|
||||
|
|
Loading…
Reference in a new issue