const express = require('express')
const router = express.Router()
const controller = require('../controllers/profile.controller')
const apiKey = require('../../../middlewares/apiKey')
const jwt = require('../../../middlewares/authentication')
const upload = require('../../../middlewares/upload')

router.get('/', apiKey, jwt, (req, res) => {
    controller.getProfile(req, res)
})

router.put('/', apiKey, jwt,upload.single("avatar"), (req, res) => {
    controller.update(req, res)
})

router.get('/overview', apiKey, jwt, (req, res) => {
    controller.getOverview(req, res)
})

module.exports = router