ScheduleEntry endpoints for 'type' and 'zenith'
This commit is contained in:
parent
d6b4323f55
commit
009109c8f2
@ -50,6 +50,16 @@ public class ScheduleEntryController {
|
||||
return scheduleEntryWriteService.set(id, ScheduleEntry::setSunday, value);
|
||||
}
|
||||
|
||||
@PostMapping("set/{id}/type")
|
||||
public ScheduleEntryDto setType(@PathVariable final long id, @RequestBody final String value) {
|
||||
return scheduleEntryWriteService.set(id, ScheduleEntry::setType, ScheduleEntryType.valueOf(value));
|
||||
}
|
||||
|
||||
@PostMapping("set/{id}/zenith")
|
||||
public ScheduleEntryDto setZenith(@PathVariable final long id, @RequestBody final String value) {
|
||||
return scheduleEntryWriteService.set(id, ScheduleEntry::setZenith, Double.parseDouble(value));
|
||||
}
|
||||
|
||||
@PostMapping("set/{id}/hour")
|
||||
public ScheduleEntryDto setHour(@PathVariable final long id, @RequestBody final int value) {
|
||||
return scheduleEntryWriteService.set(id, ScheduleEntry::setHour, value);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user