diff --git a/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java b/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java index c89d78a..5c5616c 100644 --- a/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java +++ b/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java @@ -3,6 +3,8 @@ import org.springframework.stereotype.Component; import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; @Component @Path("rooms") @@ -18,12 +20,25 @@ boolean gameTimer = true; /* RoomManager rm = RoomManager.getInstance(); - Room room = rm.getRoom(); */ + + + @GET + @Produces(MediaType.APPLICATION_JSON) @Path("/{rid}/settings") public Object GetSettings(@PathParam("rid") String rid){ + var response = Response.status(Response.Status.NO_CONTENT); + //Room r = rm.getRoom(rid); + //部屋が存在しない + /* + if(r == null) { + response.status(404).entity("部屋が存在しません"); + throw new WebApplicationException(response.build()); + } + */ + return "drawingTime:" + drawingTimer + ",\n" + "drawingTimerTimes:" + drawingTimerTimes + ",\n" + "gameTimer:" + gameTimer +",\n" +