From b0256e4e9f84eb012487f36effae0f918591d402 Mon Sep 17 00:00:00 2001 From: phgkfux43 <3469266505@qq.com> Date: Sat, 26 Apr 2025 22:39:20 +0800 Subject: [PATCH] ADD file via upload --- auth2.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 auth2.js 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