Fixed the editing process

This commit is contained in:
Nicolai Ort 2020-06-08 11:55:24 +02:00
parent 92fb7b2e86
commit 692c0ba671

View File

@ -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 };