diff --git a/src/main/java/org/ntlab/citrusserver/resources/FavoritesRest.java b/src/main/java/org/ntlab/citrusserver/resources/FavoritesRest.java index 5dd76fc..c90074a 100644 --- a/src/main/java/org/ntlab/citrusserver/resources/FavoritesRest.java +++ b/src/main/java/org/ntlab/citrusserver/resources/FavoritesRest.java @@ -30,7 +30,7 @@ @GET @Produces(MediaType.APPLICATION_JSON) public HashMap> getFavoritesBooks(@PathParam("account_id") String accountId, @QueryParam("token") String token){ - if(FavoriteManager.getFavoritesBooks(accountId) == null){ + if(favoriteManager.getFavorites(accountId) == null){ var response = Response.status(Response.Status.NOT_FOUND).entity("アカウントが見つかりません"); throw new WebApplicationException(response.build()); } @@ -40,7 +40,7 @@ throw new WebApplicationException(response.build()); } else{ - return FavoriteManager.getFavoritesBooks(accountId); + return favoriteManager.getFavorites(accountId); } } } @@ -49,7 +49,7 @@ @GET @Produces(MediaType.APPLICATION_JSON) public HashSet getFavoritesBooksById(@PathParam("account_id") String accountId, @PathParam("other_account_id") String otherAccountId, @QueryParam("token") String token){ - if(FavoriteManager.getFavoritesBooksById(accountId) == null){ + if(favoriteManager.getFavoritesByID(accountId, otherAccountId) == null){ var response = Response.status(Response.Status.NOT_FOUND).entity("アカウントが見つかりません"); throw new WebApplicationException(response.build()); } @@ -59,7 +59,7 @@ throw new WebApplicationException(response.build()); } else{ - return FavoriteManager.getFavoritesBooks(accountId); + return favoriteManager.getFavoritesByID(accountId, otherAccountId); } } }