From 7da0602759815854e5a94ed38f25cbed7dc6bc6f Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 8 Mar 2022 21:17:58 +0100 Subject: [PATCH] use getNote instead of Notes.find If a note is not visible to the requesting user, an error will be raised. --- packages/backend/src/server/api/endpoints/notes/create.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 5144fcf0cd..e96a05e12e 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -11,6 +11,7 @@ import { noteVisibilities } from '../../../../types.js'; import { ApiError } from '../../error.js'; import define from '../../define.js'; import { HOUR } from '@/const.js'; +import { getNote } from '../../common/getters.js'; export const meta = { tags: ['notes'],