diff options
Diffstat (limited to 'src/models/note.ts')
| -rw-r--r-- | src/models/note.ts | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/models/note.ts b/src/models/note.ts index f2fb39051b..8ca65bb423 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -38,11 +38,7 @@ export type INote = { fileIds: mongo.ObjectID[]; replyId: mongo.ObjectID; renoteId: mongo.ObjectID; - poll: { - choices: Array<{ - id: number; - }> - }; + poll: IPoll; text: string; tags: string[]; tagsLower: string[]; @@ -102,6 +98,16 @@ export type INote = { _files?: IDriveFile[]; }; +export type IPoll = { + choices: IChoice[] +}; + +export type IChoice = { + id: number; + text: string; + votes: number; +}; + export const hideNote = async (packedNote: any, meId: mongo.ObjectID) => { let hide = false; |