diff --git a/auth2.js b/auth2.js new file mode 100644 index 0000000..a8db9cb --- /dev/null +++ b/auth2.js @@ -0,0 +1,10 @@ +const express = require('express'); +const router = express.Router(); +const authController = require('../controllers/auth'); +const { protect } = require('../middlewares/auth'); + +router.post('/register', authController.register); +router.post('/login', authController.login); +router.get('/me', protect, authController.getMe); + +module.exports = router; \ No newline at end of file