#Removing pdf file, do not reach the function
10 messages · Page 1 of 1 (latest)
You mean with my function in client?
remove(): void {
this.saleService.getinvoice(this.id!).subscribe((response: MySales) => {
const filename = response.facnr + 'VF.pdf';
this.fileservice.removePdf(filename);
});
this.saleService.removeInvoice(this.id!).subscribe({
next: () => {
this.saleService.getinvoices().subscribe((response: Response) => {
this.toast.showToast(
TOAST_STATE.success,
'Succesvol verwijderen van factuurnummer: ' +
this.detailForm.get('facnr')?.value +
'!'
);
this.router.navigate(['invoicing/sales']);
});
},
error: (error) =>
this.toast.showToast(
TOAST_STATE.success,
'Er is iets mis gegaan: ' + error
),
});
this.dismissError();
}```
Yeah, I believe you'll need to subscribe to that remove pdf call
ima try it give me minut
Otherwise, as it's an observable, it'll never actually be called
i tried, it still does not remove them
Okay. Does your server actually get called? Do you have any errors on the server? You said this worked from postman, right?