class TipsAndTricksController {

    @ApiOperation(value = "Add new tips & tricks.")
    @ApiResponses(value = {
        @ApiResponse(code = 201, message = HttpStatuses.CREATED,
            response = TipsAndTricksDtoResponse.class),
        @ApiResponse(code = 303, message = HttpStatuses.SEE_OTHER),
        @ApiResponse(code = 403, message = HttpStatuses.FORBIDDEN),
    })
    @PostMapping(consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE})
    public ResponseEntity<TipsAndTricksDtoResponse> save(
        @ApiParam(value = "Add tips & tricks request", required = true)
        @RequestPart @ValidTipsAndTricksDtoRequest TipsAndTricksDtoRequest tipsAndTricksDtoRequest,
        @ApiParam(value = "Tips & tricks image")
        @ImageValidation
        @RequestPart(required = false) MultipartFile image,
        @ApiIgnore Principal principal) {
        return ResponseEntity.status(HttpStatus.CREATED).body(
            tipsAndTricksService.save(tipsAndTricksDtoRequest, image, principal.getName()));
    }

}