diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-18 09:54:53 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-18 09:54:53 +0900 |
| commit | 80e5645a84cc60d76f79c48a3d565fb66ad88643 (patch) | |
| tree | 1e2fc1c6c9ffb7989c5db997eae906c013433eda /src/models/note.ts | |
| parent | Merge pull request #1738 from rinsuki/features/ts-noimplicitany-true (diff) | |
| download | sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.tar.gz sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.tar.bz2 sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.zip | |
wip
Diffstat (limited to 'src/models/note.ts')
| -rw-r--r-- | src/models/note.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/models/note.ts b/src/models/note.ts index 83e85f8498..83cd93353b 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import * as deepcopy from 'deepcopy'; +const deepcopy = require('deepcopy'); import rap from '@prezzemolo/rap'; import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; @@ -37,7 +37,11 @@ export type INote = { mediaIds: mongo.ObjectID[]; replyId: mongo.ObjectID; renoteId: mongo.ObjectID; - poll: any; // todo + poll: { + choices: Array<{ + id: number; + }> + }; text: string; tags: string[]; tagsLower: string[]; @@ -304,7 +308,7 @@ export const pack = async ( if (vote != null) { const myChoice = poll.choices - .filter(c => c.id == vote.choice)[0]; + .filter((c: any) => c.id == vote.choice)[0]; myChoice.isVoted = true; } |