diff --git a/packages/backend/src/server/api/endpoints/notes/history.ts b/packages/backend/src/server/api/endpoints/notes/history.ts index 341e772833..04779e4b50 100644 --- a/packages/backend/src/server/api/endpoints/notes/history.ts +++ b/packages/backend/src/server/api/endpoints/notes/history.ts @@ -66,7 +66,7 @@ export default class extends Endpoint { // eslint- if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); throw err; }); - q.andWhere('noteHistory.targetId = :noteId', { targetId: note.id }); + q.andWhere('noteHistory.targetId = :targetId', { targetId: note.id }); const histories = await q.limit(ps.limit).getMany(); return await this.noteHistoryEntityService.packMany(histories, me, { detail: true,