diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-05 12:00:39 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-05 12:00:39 +0900 |
| commit | 17a23c3eb508bd15bc68999f448224eb7cc64354 (patch) | |
| tree | ef7ece8bf80ea957981856746b30be9beac544af /src/api/endpoints/posts/polls | |
| parent | Clean up :sparkles: (diff) | |
| download | sharkey-17a23c3eb508bd15bc68999f448224eb7cc64354.tar.gz sharkey-17a23c3eb508bd15bc68999f448224eb7cc64354.tar.bz2 sharkey-17a23c3eb508bd15bc68999f448224eb7cc64354.zip | |
Use cafy
Diffstat (limited to 'src/api/endpoints/posts/polls')
| -rw-r--r-- | src/api/endpoints/posts/polls/vote.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/endpoints/posts/polls/vote.ts b/src/api/endpoints/posts/polls/vote.ts index 36d0de975b..d049041b2f 100644 --- a/src/api/endpoints/posts/polls/vote.ts +++ b/src/api/endpoints/posts/polls/vote.ts @@ -1,7 +1,7 @@ /** * Module dependencies */ -import it from '../../../it'; +import it from 'cafy'; import Vote from '../../../models/poll-vote'; import Post from '../../../models/post'; import notify from '../../../common/notify'; @@ -36,7 +36,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { it(params.choice).expect.string() .required() .validate(c => post.poll.choices.some(x => x.id == c)) - .qed(); + .get(); if (choiceError) return rej('invalid choice param'); // if already voted |