Skip to content
Snippets Groups Projects
Commit 475cee90 authored by syuilo's avatar syuilo
Browse files

perf(server): reduce db query when get notifications

parent 3cac8e0f
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment