const express = require('express')
const router = express.Router()
const { loginValidationRules, loginUser } = require('../../../controllers/application/login/loginController')
const { verifyUser } = require('../../../controllers/application/login/verifyController')
const { changePasswordUser, changePasswordValidationRules, editChangePasswordUser } = require('../../../controllers/application/login/changePasswordController')
const { loginWithUserName } = require('../../../controllers/application/login/loginWithUserName')

router.post('/', loginValidationRules(), loginUser)
router.post('/verify', verifyUser)
router.post('/change_password', changePasswordValidationRules(), changePasswordUser)
router.patch('/change_password', changePasswordValidationRules(), editChangePasswordUser)
router.post('/login_username', loginWithUserName)

module.exports = router
