From 539cf811ec6613607f0752016efeaa5aa70f21c8 Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 20 Jan 2019 11:27:31 +0900 Subject: [PATCH] fix type --- src/models/note.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/models/note.ts b/src/models/note.ts index f2fb39051b..fb739faf90 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -39,9 +39,7 @@ export type INote = { replyId: mongo.ObjectID; renoteId: mongo.ObjectID; poll: { - choices: Array<{ - id: number; - }> + choices: choice[] }; text: string; tags: string[]; @@ -102,6 +100,12 @@ export type INote = { _files?: IDriveFile[]; }; +export type choice = { + id: number; + text: string; + votes: number; +}; + export const hideNote = async (packedNote: any, meId: mongo.ObjectID) => { let hide = false;