mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
added init files
This commit is contained in:
13
backend/src/routes/auth.ts
Normal file
13
backend/src/routes/auth.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// backend/src/routes/auth.ts
|
||||
import express from 'express';
|
||||
import { login, register, logout, getCurrentUser } from '../controllers/authController';
|
||||
import { authMiddleware } from '../middleware/auth';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.post('/login', login);
|
||||
router.post('/register', register);
|
||||
router.post('/logout', authMiddleware, logout);
|
||||
router.get('/me', authMiddleware, getCurrentUser);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user