Changed controllers to classes, added image functionality

This commit is contained in:
Torsten Schulz
2024-09-21 15:26:29 +02:00
parent e494fe41db
commit f1b6dd74f7
20 changed files with 836 additions and 581 deletions

View File

@@ -1,11 +1,12 @@
import { Router } from 'express';
import { register, login, forgotPassword, activateAccount } from '../controllers/authController.js';
import AuthController from '../controllers/authController.js';
const router = Router();
const authController = new AuthController();
router.post('/register', register);
router.post('/login', login);
router.post('/forgot-password', forgotPassword);
router.post('/activate', activateAccount);
router.post('/register', authController.register);
router.post('/login', authController.login);
router.post('/forgot-password', authController.forgotPassword);
router.post('/activate', authController.activateAccount);
export default router;