[search] fixed api query, live/dynamic search is now working (verified on dhis-live...
authorErik Haider Forsén <erik@forsen.not>
Sat, 14 Nov 2015 12:23:36 +0000 (13:23 +0100)
committerErik Haider Forsén <erik@forsen.not>
Sat, 14 Nov 2015 12:23:36 +0000 (13:23 +0100)
src/components/search/SearchService.ts

index cc56f5a..00764f3 100644 (file)
@@ -9,7 +9,7 @@ export class SearchService {
 
     }
     search(query: string): Rx.Observable<any[]>{
-        return this.http.get(dhisAPI + "/organisationUnits?paging=false&query=" + query)
+        return this.http.get(dhisAPI + "/api/organisationUnits?paging=false&filter=name:like:" + query)
             .map(res=>res.json())
             .map(res => res.organisationUnits)
             .filter(orgunits => orgunits);