Skip to content

Commit

Permalink
fix(backend): お知らせのページネーションが機能しない misskey-dev#11800 (misskey-dev#11890)
Browse files Browse the repository at this point in the history
* fix(backend): お知らせのページネーションが機能しない misskey-dev#11800

* Update CHANGELOG
  • Loading branch information
tai-cha authored Sep 24, 2023
1 parent 281369d commit dc8ab01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
-->

## (unreleased)
### General
-

### Client
-

### Server
- Fix: お知らせのページネーションが機能しない

## 2023.9.0 (unreleased)

### Note
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/announcements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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)
.where('announcement.isActive = :isActive', { isActive: ps.isActive })
.andWhere('announcement.isActive = :isActive', { isActive: ps.isActive })
.andWhere(new Brackets(qb => {
if (me) qb.orWhere('announcement.userId = :meId', { meId: me.id });
qb.orWhere('announcement.userId IS NULL');
Expand Down

0 comments on commit dc8ab01

Please sign in to comment.