@@ -31,8 +31,15 @@ public class ViolationStatisticsHandler implements RequestHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse handle(BaseRequest request) throws Exception {
|
public BaseResponse handle(BaseRequest request) throws Exception {
|
||||||
ViolationStatisticsRequest statRequest = objectMapper.convertValue(
|
log.info("start find violation statistic");
|
||||||
request.getMessageBody(), ViolationStatisticsRequest.class);
|
log.info("start find violation statistic");
|
||||||
|
log.info("start find violation statistic");
|
||||||
|
log.info("start find violation statistic");
|
||||||
|
log.info("start find violation statistic");
|
||||||
|
log.info("start find violation statistic");
|
||||||
|
log.info("start find violation statistic");
|
||||||
|
ViolationStatisticsRequest statRequest = objectMapper.convertValue(request.getMessageBody(),
|
||||||
|
ViolationStatisticsRequest.class);
|
||||||
|
|
||||||
validateRequest(statRequest);
|
validateRequest(statRequest);
|
||||||
|
|
||||||
@@ -48,8 +55,7 @@ public class ViolationStatisticsHandler implements RequestHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<AuthToken> tokenOptional =
|
Optional<AuthToken> tokenOptional = authTokenRepository.findByToken(statRequest.getToken());
|
||||||
authTokenRepository.findByToken(statRequest.getToken());
|
|
||||||
|
|
||||||
if (tokenOptional.isEmpty()) {
|
if (tokenOptional.isEmpty()) {
|
||||||
throw new IllegalArgumentException("User token is required");
|
throw new IllegalArgumentException("User token is required");
|
||||||
|
|||||||
Reference in New Issue
Block a user