diff --git a/src/main/java/org/ntlab/nemophila/resources/shops/ShopPostsRest.java b/src/main/java/org/ntlab/nemophila/resources/shops/ShopPostsRest.java index 1f4a1aa..aa74eeb 100644 --- a/src/main/java/org/ntlab/nemophila/resources/shops/ShopPostsRest.java +++ b/src/main/java/org/ntlab/nemophila/resources/shops/ShopPostsRest.java @@ -18,7 +18,7 @@ @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{sid}/posts") - public ArrayList getShopPosts(@PathParam("sid") String sid) { + public ArrayList getPosts(@PathParam("sid") String sid) { ShopManager sm = ShopManager.getInstance(); Shop shop = sm.getShop(sid); @@ -31,26 +31,24 @@ @PUT @Path("{sid}/posts/{uid}/{pid}") - public void putShopPosts(@PathParam("sid") String sid, - @PathParam("uid") String uid, - @PathParam("pid") String pid, - @FormParam("token") String token){ + public void putPost(@PathParam("sid") String sid, + @PathParam("uid") String uid, + @PathParam("pid") String pid, + @FormParam("token") String token){ ShopManager sm = ShopManager.getInstance(); Shop shop = sm.getShop(sid); AccountManager am = AccountManager.getInstance(); Account ac = am.getAccount(uid); shop.addPost(ac.getPost(pid)); - - } @DELETE @Path("{sid}/posts/{uid}/{pid}") - public String deleteShopPosts(@PathParam("sid") String sid, - @PathParam("uid") String uid, - @PathParam("pid") String pid, - @FormParam("token") String token){ + public String deletePost(@PathParam("sid") String sid, + @PathParam("uid") String uid, + @PathParam("pid") String pid, + @FormParam("token") String token){ ShopManager sm = ShopManager.getInstance(); Shop shop = sm.getShop(sid); AccountManager am = AccountManager.getInstance();