add missing GROUP BY to threadMutingsCache / noteMutingsCache
This commit is contained in:
parent
7200c3d6c8
commit
d2b4035f7a
1 changed files with 2 additions and 0 deletions
|
|
@ -159,6 +159,7 @@ export class CacheService implements OnApplicationShutdown {
|
|||
.createQueryBuilder('muting')
|
||||
.select('"muting"."userId"', 'userId')
|
||||
.addSelect('array_agg("muting"."threadId")', 'threadIds')
|
||||
.groupBy('"muting"."userId"')
|
||||
.where({ userId: In(muterIds), isPostMute: false })
|
||||
.getRawMany<{ userId: string, threadIds: string[] }>()
|
||||
.then(ms => ms.map(m => [m.userId, new Set(m.threadIds)])),
|
||||
|
|
@ -173,6 +174,7 @@ export class CacheService implements OnApplicationShutdown {
|
|||
.createQueryBuilder('muting')
|
||||
.select('"muting"."userId"', 'userId')
|
||||
.addSelect('array_agg("muting"."threadId")', 'threadIds')
|
||||
.groupBy('"muting"."userId"')
|
||||
.where({ userId: In(muterIds), isPostMute: true })
|
||||
.getRawMany<{ userId: string, threadIds: string[] }>()
|
||||
.then(ms => ms.map(m => [m.userId, new Set(m.threadIds)])),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue