From 692c0ba671bf601dd1076fee4b3e90a47c89c279 Mon Sep 17 00:00:00 2001 From: Niggl Date: Mon, 8 Jun 2020 11:55:24 +0200 Subject: [PATCH] Fixed the editing process --- 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 602ef0c..7f2aa19 100644 --- a/src/app/task-form/task-form.component.ts +++ b/src/app/task-form/task-form.component.ts @@ -29,7 +29,11 @@ export class TaskFormComponent implements OnInit { if (this.task !== null && this.task !== undefined) { this.task.title = this.title; this.task.content = this.content; - this.backendService.putTask(this.task); + this.backendService.putTask(this.task).subscribe(response => { + if (response.status > 399) { + alert('Fehler'); + } + }); } else { this.task = { title: this.title, content: this.content };