diff options
Diffstat (limited to 'packages/backend/src/server/api/endpoints/notes/renotes.ts')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/notes/renotes.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index d53d725165..f71d23146a 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -12,7 +12,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], - requireCredential: false as const, + requireCredential: false, params: { noteId: { @@ -34,11 +34,11 @@ export const meta = { }, res: { - type: 'array' as const, - optional: false as const, nullable: false as const, + type: 'array', + optional: false, nullable: false, items: { - type: 'object' as const, - optional: false as const, nullable: false as const, + type: 'object', + optional: false, nullable: false, ref: 'Note', }, }, @@ -50,8 +50,9 @@ export const meta = { id: '12908022-2e21-46cd-ba6a-3edaf6093f46', }, }, -}; +} as const; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); |