#150 Remove incorrectly referencing searchOptions

This commit is contained in:
Jonas Van Goolen
2017-12-20 16:10:39 +01:00
parent 4a56bd0f14
commit df31790183

View File

@@ -100,7 +100,7 @@ export class SearchService implements OnDestroy {
} }
search(query: string, scopeId?: string, searchOptions?: SearchOptions): Observable<RemoteData<Array<SearchResult<DSpaceObject>>>> { search(query: string, scopeId?: string, searchOptions?: SearchOptions): Observable<RemoteData<Array<SearchResult<DSpaceObject>>>> {
this.searchOptions = this.searchOptions; this.searchOptions = searchOptions;
let self = `https://dspace7.4science.it/dspace-spring-rest/api/search?query=${query}`; let self = `https://dspace7.4science.it/dspace-spring-rest/api/search?query=${query}`;
if (hasValue(scopeId)) { if (hasValue(scopeId)) {
self += `&scope=${scopeId}`; self += `&scope=${scopeId}`;
@@ -124,7 +124,7 @@ export class SearchService implements OnDestroy {
if (isNotEmpty(searchOptions)) { if (isNotEmpty(searchOptions)) {
returningPageInfo.elementsPerPage = searchOptions.pagination.pageSize; returningPageInfo.elementsPerPage = searchOptions.pagination.pageSize;
returningPageInfo.currentPage = searchOptions.pagination.currentPage; returningPageInfo.currentPage = searchOptions.pagination.currentPage;
} else { } else {
returningPageInfo.elementsPerPage = 10; returningPageInfo.elementsPerPage = 10;
returningPageInfo.currentPage = 1; returningPageInfo.currentPage = 1;