-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from CMP26Projects/Back-End
Back end
- Loading branch information
Showing
5 changed files
with
92 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import {Router} from "express" | ||
import sectorController from "../controllers/sector.controller.js" | ||
import checkRankMiddleware from "../middlewares/checkRank.middleware.js"; | ||
import { Router } from 'express' | ||
import sectorController from '../controllers/sector.controller.js' | ||
import checkRankMiddleware from '../middlewares/checkRank.middleware.js' | ||
|
||
const sectorRouter = Router(); | ||
const sectorRouter = Router() | ||
|
||
sectorRouter.get('/all', sectorController.getAllSectors) | ||
sectorRouter.post('/', sectorController.insertSector) | ||
sectorRouter.get('/', sectorController.getAllSectors) | ||
sectorRouter.get('/:baseName/:suffixName', sectorController.getSector) | ||
sectorRouter.post('/add', sectorController.insertSector) | ||
sectorRouter.patch( | ||
'/unit/set/:id/:baseName/:suffixName', | ||
'/:baseName/:suffixName', | ||
//TODO: Check if the captain id is for a unit captain | ||
sectorController.setUnitCaptain | ||
) | ||
|
||
|
||
export default sectorRouter; | ||
export default sectorRouter |