@POST @Path("/unmark-as-printed") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response unmarkAsPrinted(@Context HttpServletRequest request, String body) throws Exception { authService.guardAuthenticatedUser(request); int i = 0; for (UUID uuid : registrationListRequest(body)) { try (Connection c = dataSource.getConnection()) { registrationsSqlMapper.replacePrintedNametag(c, uuid, Option.none()); } i++; } return Response.ok( ArgoUtils.format( Result.success(String.format("Avmarkerade %s namnbrickor som utskrivna.", i)))) .build(); }