Use cafy
This commit is contained in:
parent
f210260826
commit
17a23c3eb5
67 changed files with 202 additions and 801 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import it from '../../../it';
|
||||
import it from 'cafy';
|
||||
import Post from '../../../models/post';
|
||||
import Like from '../../../models/like';
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ import Like from '../../../models/like';
|
|||
*/
|
||||
module.exports = (params) => new Promise(async (res, rej) => {
|
||||
// Get 'post_id' parameter
|
||||
const [postId, postIdErr] = it(params.post_id).expect.id().required().qed();
|
||||
const [postId, postIdErr] = it(params.post_id).expect.id().required().get();
|
||||
if (postIdErr) return rej('invalid post_id param');
|
||||
|
||||
// Lookup post
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue