Files
mbmanager-api/components/transaction/transactionRoutes.js
T

29 lines
720 B
JavaScript

const express = require('express')
const transactionController = require('./transactionController')
// const perm = require('../../middlewares/permissionMiddleware')
const loginCheck = require('../../middlewares/loginCheck')
const router = new express.Router()
router.use(loginCheck.loginProtect)
router.get(
'/admin/self',
// perm.requires('getallbelongings'),
transactionController.getUserTransaction
)
router.post(
'/admin/create',
// perm.requires('getallbelongings'),
transactionController.createTransaction
)
router.get(
'/admin/belonging/:belongingId/inventory',
// perm.requires('getallbelongings'),
transactionController.getBelongingInventory
)
module.exports = router