diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java index fbf5b7c..273a9b3 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java @@ -52,7 +52,7 @@ @Path("/{aid}/pageMap/0/layers/0/strokes") @POST @Produces(MediaType.APPLICATION_JSON) - public void addStrokes(@PathParam("aid") Integer aid, @FormParam("uid") Integer uid, @FormParam("uidToken") Integer uidToken, + public Integer addStrokes(@PathParam("aid") Integer aid, @FormParam("uid") Integer uid, @FormParam("uidToken") Integer uidToken, @FormParam("pen") Integer pen, @FormParam("color") Integer color, @FormParam("thick") Integer thick) { var animation = gallery.getAnimationInformation(aid); @@ -65,6 +65,8 @@ // }else{ // throw new WebApplicationException(401); // } + + return stroke.getStrokeNo(); } @@ -97,7 +99,7 @@ @Path("/{aid}/pageMap/0/layers/0/strokes/{strokeNo}/position") @POST @Produces(MediaType.APPLICATION_JSON) - public void addPositions(@PathParam("aid") Integer aid, @PathParam("strokeNo") Integer strokeNo, @FormParam("x") Float x, @FormParam("y") Float y) { + public Integer addPositions(@PathParam("aid") Integer aid, @PathParam("strokeNo") Integer strokeNo, @FormParam("x") Float x, @FormParam("y") Float y) { var animation = gallery.getAnimationInformation(aid); Position position = new Position(); @@ -110,6 +112,7 @@ // }else{ // throw new WebApplicationException(401); // } + return stroke.getPositions().size(); } }