//Installation d'un tag
/*



*/
// Upload de file
const express = require('express');
// Classes
const Tags = require('../models/Tags');
// Middlewares
const router = express.Router();
router.get('/:filename', (req, res) => {
  //logger.info('route tags get ', req.params.filename);
  const savetag = Tags.getfile(req.params.filename, req);
  if(savetag.status == 200) {
    res.sendFile(savetag.payload.filename);
  } else {
    res.status(savetag.status)
      .send({ payload: savetag.payload })
  }
})
router.post('/:tribeid', (req, res) => {
  //logger.info('route tags post ', req.params.tribeid);
  const savetag = Tags.savehits(req);
  res.status(200)
    .send('');
})
module.exports = router;
