/var/www/qr4y.kz/server/delivery/api/routes
Edit: /var/www/qr4y.kz/server/delivery/api/routes/user.router.js (1436B)
const UserController = require('../controllers/user.controller')
const auth = require('../middleware/auth')
module.exports = ({ router, db, services }) => {
const controller = new UserController({ db, services })
router.get('/api/user/profile', auth, controller.Profile)
router.get('/api/user/list', auth, controller.List)
router.get('/api/user/details/:uid', auth, controller.Details)
router.post('/api/user/create', auth, controller.Create)
router.post('/api/user/edit', auth, controller.Edit)
router.post('/api/user/delete', auth, controller.Delete)
router.post('/api/user/add_phone', auth, controller.AddPhone)
router.post('/api/user/remove_phone', auth, controller.RemovePhone)
router.post('/api/user/add_address', auth, controller.AddAddress)
router.post('/api/user/edit_address', auth, controller.EditAddress)
router.post('/api/user/remove_address', auth, controller.RemoveAddress)
router.post('/api/user/set_default_address', auth, controller.SetDefaultAddress)
router.post('/api/user/add_token', auth, controller.AddToken)
router.post('/api/user/remove_token', auth, controller.RemoveToken)
router.post('/api/user/confirm_email_request', auth, controller.ConfirmEmailRequest)
router.post('/api/user/confirm_email', auth, controller.ConfirmEmail)
router.post('/api/user/push_message', controller.PushMessage)
router.get('/api/user/user_login_history', auth, controller.UserLoginHistory)
return router
}