testApi(viewData: any): Observable<any> {
return this.http
.delete<any[]>(URL, viewData)
.pipe(
map((res: any) => {
// add snackbar or toast function here;
return res;
})
)
.pipe(
catchError((error: any) => {
// add snackbar or toast function here;
return throwError(error);
})
);
}