Fix inverted create and update calls.
This commit is contained in:
parent
2f64fa1018
commit
fc14efbda1
@ -105,7 +105,7 @@ export class ScheduleListComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
|
|
||||||
save(schedule: Schedule) {
|
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.toastrService.success('Schedule #' + schedule.id + ' saved.');
|
||||||
|
|
||||||
this.load();
|
this.load();
|
||||||
|
@ -63,7 +63,7 @@ export class ScheduleRowComponent {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
save(schedule: Schedule) {
|
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.toastrService.success('Schedule #' + schedule.id + ' saved.');
|
||||||
|
|
||||||
this.needsReload.emit();
|
this.needsReload.emit();
|
||||||
|
Loading…
Reference in New Issue
Block a user