mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix get applications API response
This commit is contained in:
parent
71c792739c
commit
cf8e23ff32
@ -95,6 +95,7 @@ public class HandlerUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
proxyResponse.setCode(statusCode);
|
proxyResponse.setCode(statusCode);
|
||||||
|
proxyResponse.setData(jsonString);
|
||||||
proxyResponse
|
proxyResponse
|
||||||
.setExecutorResponse(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX + getStatusKey(statusCode));
|
.setExecutorResponse(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX + getStatusKey(statusCode));
|
||||||
return proxyResponse;
|
return proxyResponse;
|
||||||
|
|||||||
@ -82,7 +82,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
|
|||||||
try {
|
try {
|
||||||
ApplicationList applications = applicationManager.getApplications(filter);
|
ApplicationList applications = applicationManager.getApplications(filter);
|
||||||
if (applications.getApplications().isEmpty()) {
|
if (applications.getApplications().isEmpty()) {
|
||||||
return Response.status(Response.Status.NOT_FOUND)
|
return Response.status(Response.Status.OK)
|
||||||
.entity("Couldn't find any application for the requested query.").build();
|
.entity("Couldn't find any application for the requested query.").build();
|
||||||
}
|
}
|
||||||
return Response.status(Response.Status.OK).entity(applications).build();
|
return Response.status(Response.Status.OK).entity(applications).build();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user