mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add validation to event retrial
This commit is contained in:
parent
e5cc5284e3
commit
e12e7a3876
@ -348,6 +348,10 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
|||||||
String errorMessage = "Invalid values for from/to";
|
String errorMessage = "Invalid values for from/to";
|
||||||
return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
|
return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
|
||||||
}
|
}
|
||||||
|
if (limit == 0) {
|
||||||
|
String errorMessage = "Invalid values for offset/limit";
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
|
||||||
|
}
|
||||||
String fromDate = String.valueOf(from);
|
String fromDate = String.valueOf(from);
|
||||||
String toDate = String.valueOf(to);
|
String toDate = String.valueOf(to);
|
||||||
String query = DEFAULT_META_DEVICE_ID_ATTRIBUTE + ":" + deviceId
|
String query = DEFAULT_META_DEVICE_ID_ATTRIBUTE + ":" + deviceId
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user