@@ -1819,28 +1819,32 @@ private String sendDiceInvitation(UserDiceAttributes diceAttributes)
18191819 @ POST
18201820 @ Path ("/dice-callback" )
18211821 @ Timed
1822- public ApiResponse diceCallback (@ Valid PostPutRequest <DiceCallbackRequest > postRequest ,
1823- @ Context HttpServletRequest request ) {
1824- logger .info (String .format ("Dice callback: %s %s" , postRequest , request ));
1825- if (!diceAuth .isValidAPIKey (request )) {
1826- throw new APIRuntimeException (SC_FORBIDDEN , "Forbidden" );
1827- }
1822+ public ApiResponse diceCallback (@ Auth AuthUser authUser ,
1823+ @ Context HttpServletRequest request ,
1824+ @ Context HttpServletResponse response )
1825+ // public ApiResponse diceCallback(@Valid PostPutRequest<DiceCallbackRequest> postRequest,
1826+ // @Context HttpServletRequest request)
1827+ {
1828+ logger .info (String .format ("Dice callback: %s" , request ));
1829+ // if (!diceAuth.isValidAPIKey(request)) {
1830+ // throw new APIRuntimeException(SC_FORBIDDEN, "Forbidden");
1831+ // }
18281832
1829- if (postRequest == null ) {
1830- return ApiResponseFactory .createResponse (
1831- createValidationResult (true , "Connection success" ));
1832- }
1833+ // if (postRequest == null) {
1834+ // return ApiResponseFactory.createResponse(
1835+ // createValidationResult(true, "Connection success"));
1836+ // }
18331837
1834- DiceCallbackRequest status = postRequest .getParam ();
1835- if (status .getType () == null ) {
1836- logger .info (String .format ("Dice status missing type: %s %s" , postRequest , request ));
1837- throw new APIRuntimeException (SC_BAD_REQUEST , String .format (MSG_TEMPLATE_MANDATORY , "type" ));
1838- }
1839- if (status .getAction () == null || status .getAction ().isEmpty ()) {
1840- logger .info (String .format ("Dice status missing action: %s %s" , postRequest , request ));
1841- throw new APIRuntimeException (SC_BAD_REQUEST , String .format (MSG_TEMPLATE_MANDATORY , "action" ));
1842- }
1843- logger .info (status );
1838+ // DiceCallbackRequest status = postRequest.getParam();
1839+ // if (status.getType() == null) {
1840+ // logger.info(String.format("Dice status missing type: %s %s", postRequest, request));
1841+ // throw new APIRuntimeException(SC_BAD_REQUEST, String.format(MSG_TEMPLATE_MANDATORY, "type"));
1842+ // }
1843+ // if (status.getAction() == null || status.getAction().isEmpty()) {
1844+ // logger.info(String.format("Dice status missing action: %s %s", postRequest, request));
1845+ // throw new APIRuntimeException(SC_BAD_REQUEST, String.format(MSG_TEMPLATE_MANDATORY, "action"));
1846+ // }
1847+ // logger.info(status);
18441848 // switch (status.getEvent()) {
18451849 // case "connection-invitation":
18461850 // handleConnectionCreatedEvent(status.getConnectionId(), status.getEmailId(), status.getShortUrl());
0 commit comments