var express = require('express');
var router = express.Router();
var controller = require('../controllers/perfil');
var path = require('path');

const multpart = require('connect-multiparty');
var ruta = path.join(__dirname, '../public/upload');
var md_upload = multpart({ uploadDir: ruta });



router.get('/:id?', controller.get);
router.post('/', controller.post);
router.put('/', controller.put);
router.post('/upload', md_upload, controller.upload);
router.delete('/', controller.delete);

module.exports = router;