{"size": 1730, "ext": "js", "max_stars_repo_path": "routes/departamentos/departamentos.js", "max_stars_repo_name": "matallana/Angular6-base-NOT-clean", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "routes/departamentos/departamentos.js", "max_issues_repo_name": "matallana/Angular6-base-NOT-clean", "max_issues_repo_issues_event_min_datetime": "2021-09-29T17:24:49.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T04:15:01.000Z", "max_forks_repo_path": "routes/departamentos/departamentos.js", "max_forks_repo_name": "matallana/Angular6-base-NOT-clean", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 38.4444444444, "max_line_length": 111, "alphanum_fraction": 0.7601156069}
/*
*Autor: Ronnel
*Fecha: 06-08-2018
*Modulo: Routes User
*Información: Listar, Mostar una User
*observacion: no se ha realizado la accion de eliminar. 
*modificado: 09-08-2018 se agregar upadateUserII
*/
'use strict'

var express = require('express');
var api = express.Router();
var multipart = require('connect-multiparty');
var md_auth = require('../../middlerwares/authenticated');
var UserController = require('../../controller/departamentos/departamentos');
var md_upload = multipart({uploadDir:'./uploads/users'});
var md_upload_banner = multipart({uploadDir:'./uploads/users/banner'});


//Enviar

//api.post('/register',  md_auth.ensureAuth, UserController.saveUser);
 api.post('/registerdep',  md_auth.ensureAuth, UserController.saveUser);
 api.post('/registerdir',  md_auth.ensureAuth, UserController.saveDir);
/* 
api.post('/registerhome', UserController.saveUserHome);
api.post('/login',  UserController.loginUser);
api.post('/upload-imagen-user/:id', [md_auth.ensureAuth, md_upload], UserController.uploadImage);
api.post('/upload-image-banner/:id', [md_auth.ensureAuth, md_upload_banner], UserController.uploadImageBanner);



//actualizar 
api.put('/updateuser', md_auth.ensureAuth, UserController.updateUser);
api.put('/update_user/:id', md_auth.ensureAuth, UserController.updateUserI);
api.put('/update_usera/:id', UserController.updateUserII);


//traer 
api.get('/imagen-banner-user/:imageFile', md_auth.ensureAuth, UserController.getImagenFileBanner);
api.get('/imagen-user/:imageFile', md_auth.ensureAuth, UserController.getImagenFile);
api.get('/get_user/:id',  md_auth.ensureAuth, UserController.getUser);
api.get('/get_users/',   md_auth.ensureAuth, UserController.getAllUser); */

module.exports = api; 