const { Router } = require('express')
const router = Router()
const bankAccount = require('../controllers/GPS.BankAccount')
const withdraw = require('../controllers/GPS.Withdraw')
const installedDevice = require('../controllers/GPS.InstalledDevice')
const score = require('../controllers/GPS.Score')
const award = require('../controllers/GPS.Award')
const awardRequest = require('../controllers/GPS.AwardRequest')
const overview = require('../controllers/GPS.Overview')
const userGPS = require('../controllers/GPS.User')
const notif = require('../controllers/GPS.Notif')

/// /////////////// Notification
router.get('/notif/:id', notif.setSeen)
router.get('/notif', notif.setSeenAll)


/// /////////////// User
router.get('/user/me', userGPS.getCurrent)
router.put('/user/me/:id', userGPS.update_user)

router.post('/user/reset-pass', userGPS.update_user_password)

/// /////////////// Overview page
router.get('/overview/main', overview.mainPage)
router.get('/overview/wallet', overview.walletPage)


/// ////////////// Award request
router.post('/award-request', awardRequest.sendRequest)
router.get('/award-request', awardRequest.findAllUser)

/// ////////////// Award
router.get('/award', award.findAllUser)

/// ///////////////// Bank card
router.post('/bank-card', bankAccount.addCard)
router.get('/bank-card', bankAccount.getAll)
router.delete('/bank-card/:id', bankAccount.deleteCard)
/// ///////////////// Withdraw request
router.post('/withdraw', withdraw.createRequest)
router.get('/withdraw', withdraw.getAllForUser)

/// //////////////// Installed device
router.post('/register-device', installedDevice.deviceRegistration)
router.get('/register-device', installedDevice.getAllForUser)

/// ///////////////// Score
router.get('/score', score.getAll)

module.exports = router
