mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 09:06:17 +02:00
Refactor
This commit is contained in:
@@ -3,7 +3,7 @@ import ID, { transform } from '../../../../misc/cafy-id';
|
||||
import Note, { packMany, INote } from '../../../../models/note';
|
||||
import define from '../../define';
|
||||
import { ApiError } from '../../error';
|
||||
import { getValiedNote } from '../../common/getters';
|
||||
import { getNote } from '../../common/getters';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@@ -44,7 +44,7 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
const note = await getValiedNote(ps.noteId).catch(e => {
|
||||
const note = await getNote(ps.noteId).catch(e => {
|
||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||
throw e;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user