I create tasks with various properties and I pass JSON data from a Java based Angular interface. Assignee is a property of the Task class at the moment. To change the behavior, a new request appeared: the user should be able to select several assignees when creating a new task.
The way I want to deal with this is that I want to create the same number of tasks as the number of rights transferred. Therefore, if n users are transferred with different task data, n tasks will be created in the database for each user as a successor.
Previously, I could only transfer one successor, and the code to return a response to a POST request was as follows:
@POST @Consumes(MediaType.APPLICATION_JSON) public Response save(TaskInDto taskInDto) {
My question is about REST design: What should I return as a Result object for the user if multiple objects have been created?
SLOBY source share