Aw5812 Update item file
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
4d5ed915ad
commit
2e40d023b1
@ -152,6 +152,13 @@ export class ItemService {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
putItemFile(item: IItem, jsonObject: any): Observable<IItem> {
|
||||||
|
const formData = new FormData();
|
||||||
|
const file = new File([JSON.stringify(jsonObject)], 'data.dat', {type: 'application/json'});
|
||||||
|
formData.append('file', file);
|
||||||
|
return this.httpClient.put<any>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/data`, formData);
|
||||||
|
}
|
||||||
|
|
||||||
deleteItem(code: string): Observable<any> {
|
deleteItem(code: string): Observable<any> {
|
||||||
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
||||||
}
|
}
|
||||||
@ -196,5 +203,4 @@ export class ItemService {
|
|||||||
getBreadcrumbs(itemCode: string): Observable<IListItem[]> {
|
getBreadcrumbs(itemCode: string): Observable<IListItem[]> {
|
||||||
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`);
|
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user