diff --git a/src/main/java/com/ntlab/irisserver/resources/MembersRest.java b/src/main/java/com/ntlab/irisserver/resources/MembersRest.java index e56127e..3d88054 100644 --- a/src/main/java/com/ntlab/irisserver/resources/MembersRest.java +++ b/src/main/java/com/ntlab/irisserver/resources/MembersRest.java @@ -1,5 +1,6 @@ package com.ntlab.irisserver.resources; +import com.ntlab.irisserver.entities.RoomJson; import com.ntlab.irisserver.models.RoomManager; import com.ntlab.irisserver.entities.Room; import com.ntlab.irisserver.entities.Member; @@ -80,10 +81,11 @@ @POST @Path("/{rid}/members") @Produces(MediaType.APPLICATION_JSON) - public Room postMembers(@PathParam("rid") String rid, @FormParam("nickname") String nickname) { + public RoomJson postMembers(@PathParam("rid") String rid, @FormParam("nickname") String nickname) { RoomManager rm = RoomManager.getInstance(); Room room = rm.getRoom(rid); List gm = room.getMembers(); + RoomJson rj = new RoomJson(room); //引数で取ってきたnicknameがListに存在しているか確認 if(room.getMember(nickname)==null && gm.size() < 10 ){ @@ -93,7 +95,7 @@ throw new WebApplicationException(response.build()); } - return room; + return rj; }