From ac8ab147bceabad5e24f35dda5e90e9f81ce0e21 Mon Sep 17 00:00:00 2001 From: Francisco Salas Date: Thu, 8 Oct 2020 14:25:33 +0200 Subject: [PATCH] added codelist service --- .../common/src/fm/services/codelistitem.service.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/common/src/fm/services/codelistitem.service.ts b/projects/common/src/fm/services/codelistitem.service.ts index f47ac45..899782c 100644 --- a/projects/common/src/fm/services/codelistitem.service.ts +++ b/projects/common/src/fm/services/codelistitem.service.ts @@ -22,4 +22,16 @@ export class CodeListItemService { } return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/codelistitems/`, { params: params }); } + + postCodeListItem(codeListItem: ICodeListItem): Observable { + return this.httpClient.post(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeListItem.codeList}`, codeListItem); + } + + putCodeListItem(codeListItem: ICodeListItem): Observable { + return this.httpClient.put(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeListItem.codeList}`, codeListItem); + } + + deleteCodeListItem(codelist: string, code: string) { + return this.httpClient.delete(`${this.ApiEndpoint()}/api/v1/codelistitems/${codelist}/${code}`); + } }