diff --git a/src/main/java/org/ntlab/citrusserver/resources/BooksRest.java b/src/main/java/org/ntlab/citrusserver/resources/BooksRest.java index 67d3ee1..daefeea 100644 --- a/src/main/java/org/ntlab/citrusserver/resources/BooksRest.java +++ b/src/main/java/org/ntlab/citrusserver/resources/BooksRest.java @@ -29,14 +29,14 @@ @Path("/{account_id}/books") @GET @Produces(MediaType.APPLICATION_JSON) - public HashMap getBooks(@PathParam("account_id") String account_id, String token){ + public HashMap getBooks(@PathParam("account_id") String account_id, @QueryParam("token") String token){ return bookManager.getBooks(account_id, token); } @Path("/{account_id}/books") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED)//bodyに入力する値がある時 - public int createBook(@PathParam("account_id") String account_id, @FormParam("title") String title, @FormParam("color") String color, @FormParam("publicity") Boolean publicity, String token) { + public int createBook(@PathParam("account_id") String account_id, @FormParam("title") String title, @FormParam("color") String color, @FormParam("publicity") Boolean publicity, @QueryParam("token") String token) { return bookManager.createBook(account_id, title, color, publicity, token); } @@ -46,14 +46,14 @@ @Path("/{account_id}/books/{book_id}") @GET @Produces(MediaType.APPLICATION_JSON) - public Book getBook(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, String token){ + public Book getBook(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @QueryParam("token") String token){ return bookManager.getBook(account_id, book_id, token); } /// 本の削除 @Path("/{account_id}/books/{book_id}") @DELETE @Consumes(MediaType.APPLICATION_FORM_URLENCODED) - public void deleteTodoById(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, String token){ + public void deleteTodoById(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @QueryParam("token") String token){ bookManager.deleteBook(account_id, book_id, token); } @@ -62,7 +62,7 @@ @Path("/{account_id}/books/{book_id}/title") @GET @Produces(MediaType.TEXT_PLAIN) - public String getTitle(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, String token){ + public String getTitle(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @QueryParam("token") String token){ return bookManager.getTitle(account_id, book_id, token); } @@ -70,7 +70,7 @@ @Path("/{account_id}/books/{book_id}/title") @PUT @Consumes(MediaType.APPLICATION_FORM_URLENCODED) - public void putTitle(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @FormParam("title") String title, String token){ + public void putTitle(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @FormParam("title") String title, @QueryParam("token") String token){ bookManager.putTitle(account_id, book_id, title, token); } @@ -79,7 +79,7 @@ @Path("/{account_id}/books/{book_id}/public") @GET @Produces(MediaType.TEXT_PLAIN) - public Boolean getPublicity(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, String token){ + public Boolean getPublicity(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @QueryParam("token") String token){ return bookManager.getPublicity(account_id, book_id, token); } @@ -87,7 +87,7 @@ @Path("/{account_id}/books/{book_id}/public") @PUT @Consumes(MediaType.APPLICATION_FORM_URLENCODED) - public void putPublicity(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @FormParam("publicity") Boolean publicity, String token){ + public void putPublicity(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @FormParam("publicity") Boolean publicity, @QueryParam("token") String token){ bookManager.putPublicity(account_id, book_id, publicity, token); } @@ -96,7 +96,7 @@ @Path("/{account_id}/books/{book_id}/color") @PUT @Consumes(MediaType.APPLICATION_FORM_URLENCODED) - public void putColor(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @FormParam("color") String color, String token){ + public void putColor(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @FormParam("color") String color, @QueryParam("token") String token){ bookManager.putColor(account_id, book_id, color, token); } } \ No newline at end of file