Skip to content

Commit

Permalink
Change query to be more like the results on betterplace.org
Browse files Browse the repository at this point in the history
Now the results are pretty much the same as the results on betterplace.org for searching corona.
#19
  • Loading branch information
MalteRei committed Apr 3, 2020
1 parent a200269 commit a3c1599
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export class SearchBarComponent implements OnInit {
}

public donationSearch(event: KeyboardEvent) {
console.log('donation search');
console.dir((event.target as HTMLInputElement).value);
if ((event.target as HTMLInputElement).value.length > 3) {
if((event.target as HTMLInputElement).value !== this.previousSearchTerm && event.key !== 'Enter') {
this.SearchProvider.search((event.target as HTMLInputElement).value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class BetterplaceSearchService implements OnDestroy, ISearchProvider<IDon
this.http
.get<IBetterplaceResponseProjects>(
this.configServices.config.donationApiUrl
+ 'projects.json?around=Germany&facets=completed%3Afalse|closed%3Afalse|prohibit_donations%3Afalse&order=rank%3ADESC&q='+query)
+ 'projects.json?facets=completed%3Afalse|closed%3Afalse|prohibit_donations%3Afalse&order=score%3Adesc|completed%3Aasc|rank%3Adesc|last_donation_at%3Adesc&q='+query)
.pipe(retry(3))
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe((searchResult: IBetterplaceResponseProjects) => {
Expand Down

0 comments on commit a3c1599

Please sign in to comment.