From 17a23c3eb508bd15bc68999f448224eb7cc64354 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 5 Mar 2017 12:00:39 +0900 Subject: Use cafy --- src/api/endpoints/aggregation/posts/repost.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/endpoints/aggregation/posts/repost.ts') diff --git a/src/api/endpoints/aggregation/posts/repost.ts b/src/api/endpoints/aggregation/posts/repost.ts index 823a6ed9e3..939f027d56 100644 --- a/src/api/endpoints/aggregation/posts/repost.ts +++ b/src/api/endpoints/aggregation/posts/repost.ts @@ -1,7 +1,7 @@ /** * Module dependencies */ -import it from '../../../it'; +import it from 'cafy'; import Post from '../../../models/post'; /** @@ -12,7 +12,7 @@ import Post from '../../../models/post'; */ 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 -- cgit v1.2.3-freya