Class TaskUpdateController
java.lang.Object
fr.tiogars.chat.domains.task.controllers.TaskUpdateController
Exposes the endpoint that updates domain records.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionTaskUpdateController(TaskUpdateService service) Creates the record update endpoint. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Task> updateTask(Long id, @Valid UpdateTaskRequest request) Replaces the payload of an existing record version.
-
Constructor Details
-
TaskUpdateController
Creates the record update endpoint.- Parameters:
service- domain record update service
-
-
Method Details
-
updateTask
@PutMapping("/api/v1/task/{id}") public org.springframework.http.ResponseEntity<Task> updateTask(@PathVariable Long id, @Valid @RequestBody @Valid UpdateTaskRequest request) Replaces the payload of an existing record version.- Parameters:
id- persistent template identifierrequest- validated version and replacement payload- Returns:
- an OK response containing the record, or a not-found response when the version is absent
-