Refactor
This commit is contained in:
parent
e8d2959717
commit
be3298639d
27 changed files with 98 additions and 173 deletions
|
@ -2,7 +2,7 @@ import $ from 'cafy';
|
|||
import ID, { transform } from '../../../../../misc/cafy-id';
|
||||
import define from '../../../define';
|
||||
import watch from '../../../../../services/note/watch';
|
||||
import { getValiedNote } from '../../../common/getters';
|
||||
import { getNote } from '../../../common/getters';
|
||||
import { ApiError } from '../../../error';
|
||||
|
||||
export const meta = {
|
||||
|
@ -38,7 +38,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;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue