Add tag filter to blogs, portfolios, and videos list APIs.

Storefronts can filter published content by metadata.tags the same way as products; website API docs are updated to match.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-22 21:14:42 +03:30
co-authored by Cursor
parent e0e122ed57
commit 1b16e79d3f
12 changed files with 128 additions and 2 deletions
+8
View File
@@ -502,6 +502,14 @@ export class BlogsService {
title: { contains: query.title.trim(), mode: 'insensitive' },
}
: {}),
...(query.tag?.trim()
? {
metadata: {
path: ['tags'],
array_contains: query.tag.trim(),
},
}
: {}),
};
}
+8
View File
@@ -39,6 +39,10 @@ export class ListBlogsDto {
@IsOptional()
@IsString()
title?: string;
@IsOptional()
@IsString()
tag?: string;
}
export class ListPublicBlogsDto {
@@ -65,6 +69,10 @@ export class ListPublicBlogsDto {
@IsOptional()
@IsString()
title?: string;
@IsOptional()
@IsString()
tag?: string;
}
export class CreateBlogDto {