update org timezone

This commit is contained in:
Patrick Nagurny
2019-06-27 16:26:31 -04:00
parent b602cb1740
commit 5b720b79c4
5 changed files with 109 additions and 0 deletions

View File

@@ -231,6 +231,11 @@ export class ApiService {
.pipe(catchError(this.handleError));
}
putOrg(org: Org): Observable<Org> {
return this.http.put<Org>(this.url + '/orgs/' + this.orgId, org, this.httpOptions)
.pipe(catchError(this.handleError));
}
getPricesNearestInTime(date: Date): Observable<Price[]> {
let query = '/orgs/' + this.orgId + '/prices?nearestDate=' + date.getTime();
return this.http.get<Price[]>(this.url + query, this.httpOptions)