Skip to content

Commit

Permalink
fix(router): add bodies before body_id
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Nov 22, 2020
1 parent 6ef0eb3 commit c80ac4c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ GeneralRouter.get('/metrics/requests', endpointsMetrics.getEndpointMetrics);
GeneralRouter.use(middlewares.authenticateUser);

GeneralRouter.get('/boards', boards.listAllBoards);
GeneralRouter.get('/:body_id', boards.listAllBoardsBody);
GeneralRouter.post('/:body_id/boards', boards.createBoard);
GeneralRouter.get('/:body_id/boards/:board_id', boards.findBoard, boards.getBoard);
GeneralRouter.put('/:body_id/boards/:board_id', boards.findBoard, boards.updateBoard);
GeneralRouter.delete('/:body_id/boards/:board_id', boards.findBoard, boards.deleteBoard);
GeneralRouter.get('/bodies/:body_id', boards.listAllBoardsBody);
GeneralRouter.post('/bodies/:body_id/boards', boards.createBoard);
GeneralRouter.get('/bodies/:body_id/boards/:board_id', boards.findBoard, boards.getBoard);
GeneralRouter.put('/bodies/:body_id/boards/:board_id', boards.findBoard, boards.updateBoard);
GeneralRouter.delete('/bodies/:body_id/boards/:board_id', boards.findBoard, boards.deleteBoard);

server.use(endpointsMetrics.addEndpointMetrics);
server.use('/', GeneralRouter);
Expand Down

0 comments on commit c80ac4c

Please sign in to comment.