import { publicController } from '../controller/publicController' module.exports = function (app: any, config: any, lang: any) { // ================== NEW USERS REGISTRATION ====================== app.get('/registration', function (req: any, res: any) { publicController.showRegistrationPage(res, lang) }) app.post('/registration', function (req: any, res: any) { publicController.registerUser(req, res, config) }) // to check whether or not an account is already exist app.get('/email/:email', async function (req: any, res: any) { publicController.checkUserEmail(req, res) }) // =================== USERS VERIFICATION ========================= app.get('/verifyAccount', async function (req: any, res: any) { publicController.verifyAccount(req, res, lang) }) // ==================== FORGOT PASSWORD =========================== app.get('/forgotPwd', function (req: any, res: any) { publicController.showForgotPwdPage(req, res, lang) }) app.post('/forgotPwd', function (req: any, res: any) { publicController.generateNewToken(req, res, config) }) // reset app.get('/reset/:token', async function (req: any, res: any) { publicController.showResetPassword(req, res, lang) }) app.post('/reset/:token', async function (req: any, res: any) { publicController.resetPassword(req, res) }) // ======================= CONTACT FORM =========================== app.get('/contact', function (req: any, res: any) { publicController.showContactPage(req, res, lang) }) app.post('/contact', function (req: any, res: any) { publicController.sendContactMessage(req, res) }) }