Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/note.picotech.app/public_html/src/routes/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const express = require('express');
const { authenticate } = require('../middleware/auth');
const { authValidations } = require('../middleware/validation');
const {
sendRegistrationOTP,
verifyOTP,
register,
login,
refreshToken,
getProfile,
updateProfile,
changeEmail,
changePassword,
forgotPassword,
resetPassword,
verifyEmail,
resendVerification,
logout,
deleteAccount,
getRegistrationConfig,
} = require('../controllers/authController');
const router = express.Router();
// Public routes (no authentication required)
router.get('/registration-config', getRegistrationConfig);
router.post('/send-registration-otp', authValidations.sendRegistrationOTP, sendRegistrationOTP);
router.post('/verify-otp', authValidations.verifyOTP, verifyOTP);
router.post('/register', authValidations.register, register);
router.post('/login', authValidations.login, login);
router.post('/refresh-token', authValidations.refreshToken, refreshToken);
router.post('/forgot-password', authValidations.forgotPassword, forgotPassword);
router.post('/reset-password', authValidations.resetPassword, resetPassword);
router.get('/verify-email/:token', verifyEmail);
// Protected routes (authentication required)
router.use(authenticate); // All routes below require authentication
router.get('/profile', getProfile);
router.put('/profile', updateProfile);
router.put('/change-email', changeEmail);
router.post('/change-password', changePassword);
router.post('/resend-verification', resendVerification);
router.post('/logout', logout);
router.delete('/account', deleteAccount);
module.exports = router; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0033 ]-- |