From b679163d01b0152b38db658fe49d8a57c6aad930 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 24 Feb 2019 09:45:27 +0900 Subject: Improve type definitions --- src/server/api/endpoints/charts/notes.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/server/api/endpoints/charts') diff --git a/src/server/api/endpoints/charts/notes.ts b/src/server/api/endpoints/charts/notes.ts index d254bb854c..cc0ca8bef7 100644 --- a/src/server/api/endpoints/charts/notes.ts +++ b/src/server/api/endpoints/charts/notes.ts @@ -1,6 +1,7 @@ import $ from 'cafy'; import define from '../../define'; -import notesChart from '../../../../services/chart/notes'; +import notesChart, { notesLogSchema } from '../../../../services/chart/notes'; +import { convertLog } from '../../../../services/chart'; export const meta = { stability: 'stable', @@ -28,12 +29,7 @@ export const meta = { }, }, - res: { - type: 'array', - items: { - type: 'object', - }, - }, + res: convertLog(notesLogSchema), }; export default define(meta, async (ps) => { -- cgit v1.2.3-freya