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.
This commit is contained in:
Fabien 'egg' O'Carroll 2023-08-28 14:34:58 +07:00 committed by GitHub
parent c1a9f2d6a6
commit 7c934ebf46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {