From 7c934ebf46e140b545850971095442bb07ed9df9 Mon Sep 17 00:00:00 2001 From: Fabien 'egg' O'Carroll Date: Mon, 28 Aug 2023 14:34:58 +0700 Subject: [PATCH] Enabled `collection` param for Post APIs This will allow us to browse posts based on their collection which will be used for rendering the collections card. As with the Collections API we're not opening up the write endpoints yet. --- ghost/posts-service/lib/PostsService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/posts-service/lib/PostsService.js b/ghost/posts-service/lib/PostsService.js index db2840b873..a02f353ed0 100644 --- a/ghost/posts-service/lib/PostsService.js +++ b/ghost/posts-service/lib/PostsService.js @@ -43,7 +43,7 @@ class PostsService { */ async browsePosts(options) { let posts; - if (this.isSet('collections') && options.collection) { + if (options.collection) { let collection = await this.collectionsService.getById(options.collection); if (!collection) {