add contacts

This commit is contained in:
Peter Maquiran
2024-06-10 16:34:43 +01:00
parent 193e7474e9
commit bf1457417d
23 changed files with 348 additions and 481 deletions
+6 -2
View File
@@ -39,10 +39,14 @@ export class HttpService {
}
async delete<T>(url: string): Promise<Result<T, HttpErrorResponse>> {
async delete<T>(url: string, body = {}): Promise<Result<T, HttpErrorResponse>> {
const options = {
body: body // Pass payload as the body of the request
};
try {
const result = await this.http.delete<T>(url).toPromise()
const result = await this.http.delete<T>(url, options).toPromise()
return ok (result as T)
} catch (e) {
return err(e as HttpErrorResponse)