mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 05:53:08 +02:00
fix(backend): Redisがからのときにhybrid-timelineにwithReplies = trueでアクセスするとSQLのシンタックスエラーになる
Fix #12064
This commit is contained in:
parent
f85a655915
commit
431d8c7802
1 changed files with 2 additions and 0 deletions
|
@ -123,6 +123,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
noteIds.sort((a, b) => a > b ? -1 : 1);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0);
|
||||
|
||||
if (!shouldFallbackToDb) {
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
|
|
Loading…
Reference in a new issue