AW-803 Add postItem.
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Peter Bastiani 2020-01-28 09:03:29 +01:00
parent 0674b0ac7c
commit 0ba553cc40

View File

@ -102,6 +102,10 @@ export class ItemService {
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${code}/features`, { params: params }); return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${code}/features`, { params: params });
} }
postItem(item:IItem): Observable<IItem> {
return this.httpClient.post<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item);
}
putItem(item:IItem): Observable<IItem> { putItem(item:IItem): Observable<IItem> {
return this.httpClient.put<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item); return this.httpClient.put<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item);
} }