mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
add contacts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user