add product and entity type

This commit is contained in:
Roland Schneider 2025-11-20 00:04:03 +01:00
parent d7bb559f95
commit 3e2bdaebc6

View File

@ -61,9 +61,6 @@ export class ProductsService {
} }
async search(term: string, options: { page: number; limit: number }) { async search(term: string, options: { page: number; limit: number }) {
if (!term || term.trim() === '') {
return { data: [], meta: { totalItems: 0, itemCount: 0, itemsPerPage: options.limit, totalPages: 0, currentPage: options.page } };
}
if (this.searchableFields.length === 0) { if (this.searchableFields.length === 0) {
console.warn('Search is not configured for this entity.'); console.warn('Search is not configured for this entity.');
return { data: [], meta: { totalItems: 0, itemCount: 0, itemsPerPage: options.limit, totalPages: 0, currentPage: options.page } }; return { data: [], meta: { totalItems: 0, itemCount: 0, itemsPerPage: options.limit, totalPages: 0, currentPage: options.page } };