From 92fb7b2e86184ab59432a66267f27186cf160f09 Mon Sep 17 00:00:00 2001 From: Niggl Date: Mon, 8 Jun 2020 11:53:50 +0200 Subject: [PATCH] Fixed the new button not working --- src/app/task-form/task-form.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/task-form/task-form.component.ts b/src/app/task-form/task-form.component.ts index 329e5a2..602ef0c 100644 --- a/src/app/task-form/task-form.component.ts +++ b/src/app/task-form/task-form.component.ts @@ -33,7 +33,11 @@ export class TaskFormComponent implements OnInit { } else { this.task = { title: this.title, content: this.content }; - this.backendService.postTask(this.task); + this.backendService.postTask(this.task).subscribe(response => { + if (response.status > 399) { + alert('Fehler'); + } + }); } this.submitted = true; this.activeModalService.close();