-
Notifications
You must be signed in to change notification settings - Fork 4
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 #2 from advanced-computer-lab-2023/SprintOneMark
Sprint one mark
- Loading branch information
Showing
16 changed files
with
238 additions
and
83 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ const router = express.Router(); | |
|
||
// | ||
|
||
module.exports = router; | ||
export default router; |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ const router = express.Router(); | |
|
||
// | ||
|
||
module.exports = router; | ||
export default router; | ||
|
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ const router = express.Router(); | |
|
||
// | ||
|
||
module.exports = router; | ||
export default router; | ||
|
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import authRouter from './auth.route'; | ||
import appointmentRouter from './appointment.route'; | ||
import chatroomRouter from './chatroom.route'; | ||
import contractRouter from './contract.route'; | ||
import notificationRouter from './notification.route'; | ||
import packageRouter from './package.route'; | ||
import prescriptionRouter from './prescription.route'; | ||
import userRouter from './user.route'; | ||
|
||
export { | ||
authRouter, | ||
appointmentRouter, | ||
chatroomRouter, | ||
contractRouter, | ||
notificationRouter, | ||
packageRouter, | ||
prescriptionRouter, | ||
userRouter | ||
}; |
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ const router = express.Router(); | |
|
||
// | ||
|
||
module.exports = router; | ||
export default router; |
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ const router = express.Router(); | |
|
||
// | ||
|
||
module.exports = router; | ||
export default router; |
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ const router = express.Router(); | |
|
||
// | ||
|
||
module.exports = router; | ||
export default router; |
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,7 +1,14 @@ | ||
import express from 'express'; | ||
const router = express.Router(); | ||
|
||
import controller from '../controllers/controller'; | ||
import { isAuthenticated, isAuthorized, queryParser } from '../middlewares'; | ||
|
||
// import the user service | ||
import { getPatients, selectPatient } from '../services/userService'; | ||
// http methods required for this router | ||
|
||
// | ||
router.get('/me/patient/', async (req, res) => controller(res)(getPatients)(req.query.doctorID)); | ||
router.get('/me/patient/:id', async (req, res) => controller(res)(selectPatient)(req.query.doctorID, req.params.id)); | ||
|
||
module.exports = router; | ||
export default router; |
Oops, something went wrong.