fix AnnouncementService
This commit is contained in:
parent
56a817b004
commit
8d35299f62
|
@ -59,7 +59,7 @@ export class AnnouncementService {
|
||||||
);
|
);
|
||||||
query.select([
|
query.select([
|
||||||
'announcement.*',
|
'announcement.*',
|
||||||
'CASE WHEN read.id IS NULL THEN FALSE ELSE TRUE END as "isRead"',
|
'read.id IS NOT NULL as "isRead"',
|
||||||
]);
|
]);
|
||||||
query
|
query
|
||||||
.andWhere(
|
.andWhere(
|
||||||
|
@ -115,10 +115,6 @@ export class AnnouncementService {
|
||||||
'read."announcementId" = announcement.id AND read."userId" = :userId',
|
'read."announcementId" = announcement.id AND read."userId" = :userId',
|
||||||
{ userId: user.id },
|
{ userId: user.id },
|
||||||
);
|
);
|
||||||
query.select([
|
|
||||||
'announcement.*',
|
|
||||||
'CASE WHEN read.id IS NULL THEN FALSE ELSE TRUE END as "isRead"',
|
|
||||||
]);
|
|
||||||
query.andWhere('read.id IS NULL');
|
query.andWhere('read.id IS NULL');
|
||||||
query.andWhere('announcement."isActive" = true');
|
query.andWhere('announcement."isActive" = true');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue