-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
executable file
·49 lines (32 loc) · 1.34 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const express = require('express');
const Router = require('express').Router;
const router = new Router();
const user = require('./model/user/user-router');
const product = require('./model/product/product-router');
const customer = require('./model/customer/customer-router');
const sale = require('./model/sale/sale-router');
const category = require('./model/category/category-router');
const field = require('./model/field/field-router');
const staticField = require('./model/static-field/static-field-router');
const type = require('./model/type/type-router');
const document = require('./model/document/document-router');
const upload = require('./model/upload/upload-router');
const rma = require('./model/rma/rma-router');
// const auth = require('./auth/auth.service');
// router.route('/').get((req, res) => {
// res.json({ message: 'Welcome to api API!' });
// });
router.use('/upload', upload);
router.use('/uploads', express.static('./uploads'))
router.use('/auth', require('./auth'));
router.use('/users', user);
router.use('/products', product);
router.use('/customers', customer);
router.use('/sales', sale);
router.use('/categories', category);
router.use('/fields', field);
router.use('/static-fields', staticField);
router.use('/types', type);
router.use('/documents', document);
router.use('/rma', rma);
module.exports = router;