-
Notifications
You must be signed in to change notification settings - Fork 3
/
router.js
52 lines (41 loc) · 2.22 KB
/
router.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
50
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(express.json());
//those are all the routes
const login = require('./routes/login.js');
const registrationCustomer = require('./routes/registrationCustomer.js');
const registrationOwner = require('./routes/registrationOwner.js');
const image = require('./routes/image-upload.js');
const searchByMenuItem = require('./routes/searchByMenuItem.js');
const manageMenuInformation = require('./routes/manageMenuInformation.js');
const searchMenu = require('./routes/searchMenu.js');
const manageRestaurantInformation = require('./routes/manageRestaurantInformation.js');
const manageCustomerReviews = require('./routes/manageCustomerReviews.js');
const manageCustomerInformation = require('./routes/manageCustomerInformation.js');
const createReview = require('./routes/createReview.js');
const getTags = require('./routes/getTags.js');
const pendingReviews = require('./routes/pendingReviews.js');
const ownerProfile = require('./routes/ownerProfile.js');
const registrationConsultant= require('./routes/registrationConsultant.js');
const consultantLogin= require('./routes/consultantLogin.js');
const consultantStatistics= require('./routes/consultantStatistics.js');
app.use('/api/image', image);
app.use('/api/user/login', login);
app.use('/api/user/owner/tag', getTags);
app.use('/api/user/owner/register', registrationOwner);
app.use('/api/user/owner/restaurant/menu', manageMenuInformation);
app.use('/api/user/owner/restaurant/review', pendingReviews);
app.use('/api/user/owner/restaurant', manageRestaurantInformation);
app.use('/api/user/owner', ownerProfile);
app.use('/api/user/customer/register', registrationCustomer);
app.use('/api/user/customer/menu/searchByMenuItem', searchByMenuItem);
app.use('/api/user/customer/menu', searchMenu);
app.use('/api/user/customer/review/restaurant', createReview);
app.use('/api/user/customer/review', manageCustomerReviews);
app.use('/api/user/customer', manageCustomerInformation);
app.use('/api/consultant/register', registrationConsultant);
app.use('/api/consultant/login', consultantLogin);
app.use('/api/consultant/statistics', consultantStatistics);
app.use(bodyParser.json());
module.exports = app;