From b50813649afed671b75189551342b179d8cd60f7 Mon Sep 17 00:00:00 2001 From: otofune Date: Mon, 6 Nov 2017 15:58:39 +0900 Subject: [PATCH] serializers - posts: fix awaiting --- src/api/serializers/post.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/serializers/post.ts b/src/api/serializers/post.ts index d1dcb66002..5788b226f4 100644 --- a/src/api/serializers/post.ts +++ b/src/api/serializers/post.ts @@ -94,7 +94,7 @@ const self = async ( if (opts.detail) { // Get previous post info _post.prev = (async () => { - const prev = Post.findOne({ + const prev = await Post.findOne({ user_id: _post.user_id, _id: { $lt: id