diff --git a/src/scheduler/scheduleList.component.ts b/src/scheduler/scheduleList.component.ts index db6f1b0..23dc281 100644 --- a/src/scheduler/scheduleList.component.ts +++ b/src/scheduler/scheduleList.component.ts @@ -105,7 +105,7 @@ export class ScheduleListComponent implements OnInit { }; save(schedule: Schedule) { - return this.scheduleService.update(schedule).subscribe((schedule: Schedule) => { + return this.scheduleService.create(schedule).subscribe((schedule: Schedule) => { this.toastrService.success('Schedule #' + schedule.id + ' saved.'); this.load(); diff --git a/src/scheduler/scheduleRow.component.ts b/src/scheduler/scheduleRow.component.ts index 020ade3..9fd4809 100644 --- a/src/scheduler/scheduleRow.component.ts +++ b/src/scheduler/scheduleRow.component.ts @@ -63,7 +63,7 @@ export class ScheduleRowComponent { ) {} save(schedule: Schedule) { - return this.scheduleService.create(schedule).subscribe((schedule: Schedule) => { + return this.scheduleService.update(schedule).subscribe((schedule: Schedule) => { this.toastrService.success('Schedule #' + schedule.id + ' saved.'); this.needsReload.emit();