2020-09-10 03:06:23 -05:00
|
|
|
let express = require('express');
|
|
|
|
|
let app = express();
|
|
|
|
|
|
2020-09-16 18:03:09 -05:00
|
|
|
// const computers_get = require('../controller/user/computers/get');
|
|
|
|
|
// const printers = require('../controller/user/printers/get');
|
2020-09-17 21:24:57 -05:00
|
|
|
const computers = require('../controller/user/computers/get');
|
|
|
|
|
const printers = require('../controller/user/printers/get');
|
2020-09-10 03:06:23 -05:00
|
|
|
const { verifyToken, verifyAdmin } = require('../middlewares/authentication');
|
|
|
|
|
|
2020-09-16 18:03:09 -05:00
|
|
|
const computersRoute = '/api/computers';
|
|
|
|
|
const printersRoute = '/api/printers';
|
|
|
|
|
|
|
|
|
|
/*=============================================
|
|
|
|
|
computer
|
|
|
|
|
=============================================*/
|
2020-09-14 18:30:15 -05:00
|
|
|
app.get('/api/computers', verifyToken, (req, res) => {
|
2020-09-17 21:24:57 -05:00
|
|
|
return computers(req, res);
|
2020-09-16 18:03:09 -05:00
|
|
|
});
|
2020-09-10 03:06:23 -05:00
|
|
|
|
2020-09-16 18:03:09 -05:00
|
|
|
/*=============================================
|
|
|
|
|
printers
|
|
|
|
|
=============================================*/
|
|
|
|
|
app.get(printersRoute, verifyToken, (req, res) => {
|
|
|
|
|
|
2020-09-17 21:24:57 -05:00
|
|
|
return printers(req, res);
|
2020-09-14 18:30:15 -05:00
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
2020-09-16 18:03:09 -05:00
|
|
|
|
|
|
|
|
|
2020-09-10 03:06:23 -05:00
|
|
|
module.exports = app;
|