add product and entity type
This commit is contained in:
parent
d7bb559f95
commit
3e2bdaebc6
@ -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 } };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user