use getNote instead of Notes.find

If a note is not visible to the requesting user, an error will be raised.
This commit is contained in:
Johann150 2022-03-08 21:17:58 +01:00 committed by ThatOneCalculator
parent 3046b87b76
commit 7da0602759

View file

@ -11,6 +11,7 @@ import { noteVisibilities } from '../../../../types.js';
import { ApiError } from '../../error.js'; import { ApiError } from '../../error.js';
import define from '../../define.js'; import define from '../../define.js';
import { HOUR } from '@/const.js'; import { HOUR } from '@/const.js';
import { getNote } from '../../common/getters.js';
export const meta = { export const meta = {
tags: ['notes'], tags: ['notes'],