summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts/trend.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/posts/trend.ts')
-rw-r--r--src/api/endpoints/posts/trend.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/endpoints/posts/trend.ts b/src/api/endpoints/posts/trend.ts
index 64a195dff1..caded92bf5 100644
--- a/src/api/endpoints/posts/trend.ts
+++ b/src/api/endpoints/posts/trend.ts
@@ -3,8 +3,7 @@
*/
const ms = require('ms');
import $ from 'cafy';
-import Post from '../../models/post';
-import serialize from '../../serializers/post';
+import Post, { pack } from '../../models/post';
/**
* Get trend posts
@@ -76,5 +75,5 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
// Serialize
res(await Promise.all(posts.map(async post =>
- await serialize(post, user, { detail: true }))));
+ await pack(post, user, { detail: true }))));
});