const Router = require('koa-router')
const userController = require('../controllers/users')

const router = new Router()

router.post('/login', userController.login)
router.post('/register', userController.register)
router.post('/register/staff', userController.registerStaff)
router.post('/register/by-staff', userController.registerByStaff)
router.get('/info', userController.getUserInfo)
router.get('/', userController.getUsers)
router.put('/:id', userController.updateUser)
router.delete('/:id', userController.deleteUser)
router.post('/change-password', userController.changePassword)
router.post('/reset-password', userController.resetPassword)
router.post('/points/add', userController.addPoints)
router.get('/points/logs', userController.getPointsLogs)

module.exports = router.routes()