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;