diff --git a/backend/src/main/java/fr/cgi/magneto/controller/BoardController.java b/backend/src/main/java/fr/cgi/magneto/controller/BoardController.java index e65fd8607..512ac37b3 100644 --- a/backend/src/main/java/fr/cgi/magneto/controller/BoardController.java +++ b/backend/src/main/java/fr/cgi/magneto/controller/BoardController.java @@ -305,13 +305,13 @@ public void getBoardResourceIds(HttpServerRequest request) { }); } - @Post("/board/:boardId/notify") + @Post("/board/:id/notify") @ApiDoc("Notify board shared users") @ResourceFilter(ManageBoardRight.class) @SecuredAction(value = "", type = ActionType.RESOURCE) public void notifyBoardUsers(HttpServerRequest request) { UserUtils.getUserInfos(eb, request, user -> { - String boardId = request.getParam(Field.BOARDID); + String boardId = request.getParam(Field.ID); boardService.getBoardSharedUsers(boardId) .onSuccess(board -> { JsonObject params = new JsonObject(); @@ -325,6 +325,7 @@ public void notifyBoardUsers(HttpServerRequest request) { .collect(Collectors.toList()); notification.notifyTimeline(request, "magneto.notify_board", user, userIdsList, params); + request.response().setStatusMessage(boardId).setStatusCode(200).end(); }) .onFailure(fail -> { String message = String.format("[Magneto@%s::notifyBoardUsers] Failed to notify users of board : %s",