diff --git a/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java b/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java index 62505a4..e2531ab 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java @@ -71,11 +71,11 @@ @Path("/{uid}/work") @PUT @Produces(MediaType.APPLICATION_JSON) - public void updateWork(@PathParam("uid") Integer invitedUid, @FormParam("token") String invitedToken, @FormParam("aid") Integer aid) { - var account = accounts.getAccountByUid(invitedUid); + public Boolean updateWork(@PathParam("uid") Integer uid, @FormParam("token") String token, @FormParam("aid") Integer aid) { + var account = accounts.getAccountByUid(uid); var animation = gallery.getAnimationInformation(aid); - if(account != null && animation != null && account.getToken().equals(invitedToken)){ + if(account != null && animation != null && account.getToken().equals(token)){ //指定ユーザーの制作作品への参加の許可 var invitedWork = account.getInvitedMap().get(aid); @@ -85,6 +85,7 @@ //作品のeditorsにユーザーを追加 animation.restWorkToEditors(account); + return true; }else{ //作品に招待されていない場合のレスポンス var response = Response.status(400).entity("作品に招待されていません");