mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5839] migrate from QueryBody to SearchResult type (#8861)
* [ci:force] migrate from QueryBody to SearchQuery * [ci:force] migrate from QueryBody to SearchQuery * [ci:force] migrate from QueryBody to SearchQuery * [ci:force] update docs and variables as per code review
This commit is contained in:
@@ -15,15 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { QueryBody } from '@alfresco/js-api';
|
||||
import { SearchRequest } from '@alfresco/js-api';
|
||||
import { SearchConfigurationInterface } from '@alfresco/adf-content-services';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class TestSearchConfigurationService implements SearchConfigurationInterface {
|
||||
|
||||
public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): QueryBody {
|
||||
const defaultQueryBody: QueryBody = {
|
||||
public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): SearchRequest {
|
||||
return {
|
||||
query: {
|
||||
query: searchTerm ? `${searchTerm}* OR name:${searchTerm}*` : searchTerm
|
||||
},
|
||||
@@ -35,9 +34,8 @@ export class TestSearchConfigurationService implements SearchConfigurationInterf
|
||||
filterQueries: [
|
||||
/* eslint-disable-next-line */
|
||||
{ query: "TYPE:'cm:folder'" },
|
||||
{ query: 'NOT cm:creator:System' }]
|
||||
{ query: 'NOT cm:creator:System' }
|
||||
]
|
||||
};
|
||||
|
||||
return defaultQueryBody;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user