diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java index a8b54e7..b9f0805 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java @@ -12,6 +12,8 @@ import javax.ws.rs.core.Response; import java.util.Collection; +import static java.lang.Boolean.TRUE; + @Component @Path("/gallery") @@ -76,7 +78,7 @@ @Path("/{aid}/invites") @PUT @Produces(MediaType.APPLICATION_JSON) - public String addInvite(@PathParam("aid") Integer aid, @FormParam("ownerUid") String ownerUid, @FormParam("invitedUid") String invitedUid, @FormParam("ownerToken") String ownerToken) { + public Boolean addInvite(@PathParam("aid") Integer aid, @FormParam("ownerUid") String ownerUid, @FormParam("invitedUid") String invitedUid, @FormParam("ownerToken") String ownerToken) { Animation animation = animations.getAnimationByAid(aid); Account invitedAccount = accounts.getAccountByUid(Integer.parseInt(invitedUid)); Account owner = animation.getOwner(); @@ -107,7 +109,7 @@ invitedAccount.getWorkHashMap().put(aid, work); invitedAccount.getWorkHashMap().get(aid).setInvites(animation); - return "追加しました"; + return TRUE; } else { throw new WebApplicationException(404); }