summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/posts.ts')
-rw-r--r--src/api/endpoints/posts.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/endpoints/posts.ts b/src/api/endpoints/posts.ts
index db166cd67a..3b29425927 100644
--- a/src/api/endpoints/posts.ts
+++ b/src/api/endpoints/posts.ts
@@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
-import Post from '../models/post';
-import serialize from '../serializers/post';
+import Post, { pack } from '../models/post';
/**
* Lists all posts
@@ -85,5 +84,5 @@ module.exports = (params) => new Promise(async (res, rej) => {
});
// Serialize
- res(await Promise.all(posts.map(async post => await serialize(post))));
+ res(await Promise.all(posts.map(async post => await pack(post))));
});