mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 03:23:08 +02:00
fix(backend): users/notesでsinceId指定時にデータベースにフォールバックするように修正
This commit is contained in:
parent
04971ca565
commit
7473b2854f
1 changed files with 65 additions and 61 deletions
|
@ -72,6 +72,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
|
const isRangeSpecified = (ps.sinceId != null || ps.sinceDate != null) && (ps.untilId != null || ps.untilDate != null);
|
||||||
|
|
||||||
|
if (isRangeSpecified || !(ps.sinceId != null || ps.sinceDate != null)) {
|
||||||
const [
|
const [
|
||||||
userIdsWhoMeMuting,
|
userIdsWhoMeMuting,
|
||||||
] = me ? await Promise.all([
|
] = me ? await Promise.all([
|
||||||
|
@ -148,6 +151,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
return await this.noteEntityService.packMany(timeline, me);
|
return await this.noteEntityService.packMany(timeline, me);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fallback to database
|
// fallback to database
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue