Added getCodeListItem api for service
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Mark van der Wal 2020-10-12 17:41:24 +02:00
parent f656ecd23f
commit 2ad04fc7c1

View File

@ -23,6 +23,10 @@ export class CodeListItemService {
return this.httpClient.get<ICodeListItem[]>(`${this.ApiEndpoint()}/api/v1/codelistitems/`, { params: params }); return this.httpClient.get<ICodeListItem[]>(`${this.ApiEndpoint()}/api/v1/codelistitems/`, { params: params });
} }
getCodeListItem(codeList: string, code: string): Observable<ICodeListItem> {
return this.httpClient.get<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeList}/${code}`);
}
postCodeListItem(codeListItem: ICodeListItem): Observable<ICodeListItem> { postCodeListItem(codeListItem: ICodeListItem): Observable<ICodeListItem> {
return this.httpClient.post<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeListItem.codeList}`, codeListItem); return this.httpClient.post<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeListItem.codeList}`, codeListItem);
} }