Rework the endpoint to create/update schedules
Currently the usage of endpoint for conflict resolution while creating or updating a schedule is too complicated.
We should rework the endpoint to:
- accept a request to create or update a schedule without
schedule
object, - respond with a HTTP status code 201 and create or update the schedule and the timeslots, if this doesn't create any conflicts,
- respond with a HTTP status code 409 and return the
projected
(withcollisions
andsolution_choices
for each new timelsot,) if this creates any conflicts, - accept a request with a
schedule
andsolutions
objects, and optionallynotes
andplaylists
objects, to try solving the conflicts, - respond with a HTTP status code 201 and create or update the schedule and the timeslots, once this doesn't create any conflicts.
This would require changes in the dashboard as well.
Edited by Ernesto Rico Schmidt