/var/www/myprog.com.ua/server/node/api/routes
Edit: /var/www/myprog.com.ua/server/node/api/routes/web_app_router.js (1338B)
const express = require('express')
const auth = require('../middleware/auth')
const web_app_router = express.Router()
const web_app_controller = require('../controllers/web_app_controller')
web_app_router.get('/companies', auth, web_app_controller.get_companies)
web_app_router.get('/companies/:id', auth, web_app_controller.get_company)
web_app_router.post('/companies/create', auth, web_app_controller.create_company)
web_app_router.post('/companies/edit', auth, web_app_controller.edit_company)
web_app_router.post('/companies/add_client', auth, web_app_controller.add_company_client)
web_app_router.post('/companies/delete_client', auth, web_app_controller.delete_company_client)
web_app_router.get('/categories', auth, web_app_controller.get_categories)
web_app_router.get('/categories/:id', auth, web_app_controller.get_category)
web_app_router.post('/categories/create', auth, web_app_controller.create_category)
web_app_router.post('/categories/edit', auth, web_app_controller.edit_category)
web_app_router.get('/products', auth, web_app_controller.get_products)
web_app_router.get('/products/:id', auth, web_app_controller.get_product)
web_app_router.post('/products/create', auth, web_app_controller.create_product)
web_app_router.post('/products/edit', auth, web_app_controller.edit_product)
module.exports = web_app_router