fix(backend): アーカイブしたお知らせがコントロールパネルに表示される問題を修正

This commit is contained in:
syuilo
2023-11-05 09:04:03 +09:00
parent 56401ed91c
commit bdbb3266ae
2 changed files with 2 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
) {
super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.announcementsRepository.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
query.andWhere('announcement.isActive = true');
if (ps.userId) {
query.andWhere('announcement.userId = :userId', { userId: ps.userId });
} else {