diff --git a/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java b/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java index 27d89be..b3adde7 100644 --- a/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java +++ b/src/main/java/org/ntlab/citrusserver/resources/TodoRest.java @@ -40,7 +40,7 @@ } //指定された本の指定された年と月のtodoをすべて返す - @Path("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}") + @Path("/{account_id}/books/{book_id}/todos/{year}/{month}") @GET @Produces(MediaType.APPLICATION_JSON) public HashMap> getTodosByMonth(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @QueryParam("token") String token) { @@ -67,7 +67,7 @@ //指定した本と年月日にtodoを新しく追加する @POST - @Path("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") + @Path("/{account_id}/books/{book_id}/todos/{year}/{month}/{day}") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void createTodo(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @FormParam("title") String title,@QueryParam("token") String token) { todoManager.createTodo(account_id, book_id, year, month, day, title,token); @@ -77,7 +77,7 @@ //todoを選んで達成状態を変更する //フォームパラメータでチェック状況 @PUT - @Path("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}/check") + @Path("/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}/check") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void setCheck(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day,@PathParam("todo_id") Integer todo_id, @FormParam("check") boolean check, @QueryParam("token") String token){ todoManager.setCheck(account_id, book_id, year, month, day, todo_id,check,token); @@ -86,7 +86,7 @@ //delete追加必要 //本のtodoを年月日とtodo_idを指定してそのtodoを削除する @DELETE - @Path("/accounts/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") + @Path("/{account_id}/books/{book_id}/todos/{year}/{month}/{day}/{todo_id}") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void deleteTodoById(@PathParam("account_id") String account_id, @PathParam("book_id") Integer book_id, @PathParam("year") Integer year, @PathParam("month") Integer month, @PathParam("day") Integer day, @PathParam("todo_id") Integer todo_id, @QueryParam("token") String token){ todoManager.deleteTodoById(account_id, book_id, year, month, day, todo_id,token);