diff --git a/src/main/java/org/ntlab/acanthus_server/entities/FollowAddJson.java b/src/main/java/org/ntlab/acanthus_server/entities/FollowAddJson.java index 741246c..fdfc810 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/FollowAddJson.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/FollowAddJson.java @@ -15,6 +15,10 @@ this.followUid = followAccount.getUid(); } + public String getMessage() { + return message; + } + public Integer getUid() { return uid; } @@ -31,4 +35,7 @@ this.followUid = followUid; } + public void setMessage(String message) { + this.message = message; + } } diff --git a/src/main/java/org/ntlab/acanthus_server/entities/FollowUidJson.java b/src/main/java/org/ntlab/acanthus_server/entities/FollowUidJson.java index 995d5ac..513ff71 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/FollowUidJson.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/FollowUidJson.java @@ -7,7 +7,7 @@ public class FollowUidJson { @JsonProperty("followsUid") - private Collection uidList = new ArrayList<>(); + private ArrayList uidList = new ArrayList<>(); //Json型でフォローしているユーザーIDを表示する処理 public FollowUidJson(Collection followUidList){ @@ -20,7 +20,7 @@ return uidList; } - public void setUidList(Collection uidList) { + public void setUidList(ArrayList uidList) { this.uidList = uidList; } diff --git a/src/main/java/org/ntlab/acanthus_server/entities/FollowerUidJson.java b/src/main/java/org/ntlab/acanthus_server/entities/FollowerUidJson.java index 4fcc657..2d42fe2 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/FollowerUidJson.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/FollowerUidJson.java @@ -7,7 +7,7 @@ public class FollowerUidJson { @JsonProperty("followersUid") - private Collection uidList = new ArrayList<>(); + private ArrayList uidList = new ArrayList<>(); //Json型でフォロワーのユーザーIDを表示する処理 public FollowerUidJson(Collection followUidList){ @@ -20,7 +20,7 @@ return uidList; } - public void setUidList(Collection uidList) { + public void setUidList(ArrayList uidList) { this.uidList = uidList; } } diff --git a/src/main/java/org/ntlab/acanthus_server/resources/accounts/FollowsRest.java b/src/main/java/org/ntlab/acanthus_server/resources/accounts/FollowsRest.java index b36033b..a33b961 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/accounts/FollowsRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/accounts/FollowsRest.java @@ -72,7 +72,7 @@ @Path("/{uid}/follows") @DELETE @Produces(MediaType.APPLICATION_JSON) - public String releaseFollows(@PathParam("uid") Integer uid, @FormParam("token") String token, @FormParam("followUid") Integer followUid){ + public void releaseFollows(@PathParam("uid") Integer uid, @FormParam("token") String token, @FormParam("followUid") Integer followUid){ var account = accounts.getAccountByUid(uid); var followAccount = account.getFollowsHashMap().get(followUid);//フォロー内アカウント参照 @@ -81,7 +81,7 @@ account.getFollowsHashMap().remove(followUid); followAccount.getFollowersHashMap().remove(uid); - return "フォローを解除しました"; + //return "フォローを解除しました"; }else { var response = Response.status(401).entity("フォローしているユーザーでないかユーザーIDが間違っています"); throw new WebApplicationException(response.build());