Class CommentRestController
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.controller.CommentRestController
Comment Rest API controller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAuthority (role) required in order to be able to invoke greeting API.static final StringBase path for backoffice Public Rest API.private CommentServiceUsers service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentDto>>>saveComment(es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentRequestDto requestDto, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Save comment for client.
-
Field Details
-
API_BASE_PATH
Base path for backoffice Public Rest API.- See Also:
-
API_AUTHORITIES
Authority (role) required in order to be able to invoke greeting API.- See Also:
-
commentService
Users service.
-
-
Constructor Details
-
CommentRestController
public CommentRestController()
-
-
Method Details
-
saveComment
@PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_CONSULTANT\') and hasRole(\'ROLE_LEVEL_USER_CONSULTANT\'))") @PostMapping(path="/api/v1/backoffice/comment", produces="application/json", consumes="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentDto>>> saveComment(@RequestBody es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentRequestDto requestDto, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Save comment for client.- Parameters:
requestDto- comment object.authentication- user credentials.- Returns:
- Comment created.
-