Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
use media type json for thing's config status REST response (#5683)
Browse files Browse the repository at this point in the history
Fixes: #5674
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
  • Loading branch information
maggu2810 authored and sjsf committed Jun 5, 2018
1 parent 449ed12 commit 73ef089
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -464,6 +464,7 @@ public Response getStatus(@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) String langu
@GET
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{thingUID}/config/status")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Gets thing's config status.")
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = String.class),
@ApiResponse(code = 404, message = "Thing not found.") })
Expand All @@ -481,9 +482,9 @@ public Response getConfigStatus(@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) String

ConfigStatusInfo info = configStatusService.getConfigStatus(thingUID, LocaleUtil.getLocale(language));
if (info != null) {
return Response.ok(null, MediaType.TEXT_PLAIN).entity(info.getConfigStatusMessages()).build();
return Response.ok().entity(info.getConfigStatusMessages()).build();
}
return Response.ok(null, MediaType.TEXT_PLAIN).entity(Collections.EMPTY_SET).build();
return Response.ok().entity(Collections.EMPTY_SET).build();
}

@PUT
Expand Down

0 comments on commit 73ef089

Please sign in to comment.