Fonctionn modifier contact ok

This commit is contained in:
AlineRinquin 2022-01-23 15:08:17 +01:00
parent 0390c45886
commit a723a02a56
13 changed files with 80 additions and 32 deletions

View file

@ -21,8 +21,8 @@ export class RepertoireService {
return this.http.get(`${this.apiUrl}/contacts/team/1`);
}
getContactById(contact: Contact): Observable<any> {
return this.http.get(`${this.apiUrl}/contacts/{id}`);
getContactById(id: any): Observable<any> {
return this.http.get(`${this.apiUrl}/contacts/` + id);
}
addContact(contact: Contact): Observable<any> {
@ -31,8 +31,8 @@ export class RepertoireService {
return this.http.post(`${this.apiUrl}/contacts/add`, contact);
}
deleteContact() {
return this.http.delete(`${this.apiUrl}/contacts/delete`);
deleteContact(contact: Contact): Observable<any> {
return this.http.delete(`${this.apiUrl}/contacts/delete/1`);
}
updateContact(contact: Contact): Observable<any> {