Search in sources :

Example 1 with UserInfoToDtoConverter

use of org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter in project Gravity-SDOH-Exchange-RI by FHIR.

the class PatientTaskController method update.

@PutMapping("{id}")
@ApiOperation(value = "Update Task resource.")
public ResponseEntity<Void> update(@PathVariable @NotBlank(message = "Task id can't be empty.") String id, @Valid @RequestBody UpdateTaskRequestDto update, @ApiIgnore @AuthenticationPrincipal OidcUser user) {
    UserDto userDto = new UserInfoToDtoConverter().convert(user.getClaims());
    patientTaskService.update(id, update, userDto);
    return ResponseEntity.noContent().build();
}
Also used : UserInfoToDtoConverter(org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter) UserDto(org.hl7.gravity.refimpl.sdohexchange.dto.response.UserDto) PutMapping(org.springframework.web.bind.annotation.PutMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 2 with UserInfoToDtoConverter

use of org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter in project Gravity-SDOH-Exchange-RI by FHIR.

the class TaskController method update.

@PutMapping("{id}")
@ApiOperation(value = "Update Task resource.")
public ResponseEntity<Void> update(@PathVariable @NotBlank(message = "Task id can't be empty.") String id, @Valid @RequestBody UpdateTaskRequestDto update, @ApiIgnore @AuthenticationPrincipal OidcUser user) {
    UserDto userDto = new UserInfoToDtoConverter().convert(user.getClaims());
    taskService.update(id, update, userDto);
    return ResponseEntity.noContent().build();
}
Also used : UserInfoToDtoConverter(org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter) UserDto(org.hl7.gravity.refimpl.sdohexchange.dto.response.UserDto) PutMapping(org.springframework.web.bind.annotation.PutMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 3 with UserInfoToDtoConverter

use of org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter in project Gravity-SDOH-Exchange-RI by FHIR.

the class OurTaskController method update.

@PutMapping("/{id}")
@ApiOperation(value = "Update Our Task resource.")
public ResponseEntity<Void> update(@PathVariable @NotBlank(message = "Task id can't be empty.") String id, @RequestBody @Valid UpdateOurTaskRequestDto updateOurTaskRequestDto, @ApiIgnore @AuthenticationPrincipal OidcUser user) {
    UserDto userDto = new UserInfoToDtoConverter().convert(user.getClaims());
    ourTaskService.update(id, updateOurTaskRequestDto, userDto);
    return ResponseEntity.noContent().build();
}
Also used : UserInfoToDtoConverter(org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter) UserDto(org.hl7.gravity.refimpl.sdohexchange.dto.response.UserDto) PutMapping(org.springframework.web.bind.annotation.PutMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

ApiOperation (io.swagger.annotations.ApiOperation)3 UserInfoToDtoConverter (org.hl7.gravity.refimpl.sdohexchange.dto.converter.UserInfoToDtoConverter)3 UserDto (org.hl7.gravity.refimpl.sdohexchange.dto.response.UserDto)3 PutMapping (org.springframework.web.bind.annotation.PutMapping)3