recup du stach et fonctionalitée modifier contact

This commit is contained in:
AlineRinquin 2022-01-22 14:57:04 +01:00
parent ef3418b45c
commit 0390c45886
6 changed files with 195 additions and 10 deletions

View file

@ -21,6 +21,10 @@ 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}`);
}
addContact(contact: Contact): Observable<any> {
console.log(contact);
@ -31,7 +35,7 @@ export class RepertoireService {
return this.http.delete(`${this.apiUrl}/contacts/delete`);
}
// updateContact(){
// return this.http.put(`${this.apiUrl}/contacts/update/1`);
// }
updateContact(contact: Contact): Observable<any> {
return this.http.put(`${this.apiUrl}/contacts/update/1`, contact);
}
}