2024-07-30 11:26:42 +00:00
|
|
|
const express = require('express')
|
|
|
|
const router = express.Router()
|
|
|
|
const { authorization, } = require('../middleware/authentication')
|
2024-08-09 13:39:04 +00:00
|
|
|
const { setApiPricing,
|
|
|
|
registerUsage,
|
|
|
|
getUsage,
|
|
|
|
registerAPICall,
|
|
|
|
registerOperation,
|
|
|
|
registerAll,
|
|
|
|
registerWhatsappUsage} = require('../controllers/apiUsagePricing')
|
2024-07-30 11:26:42 +00:00
|
|
|
|
|
|
|
router.route('/create').post(authorization, setApiPricing)
|
|
|
|
router.route('/usage').post(authorization, registerUsage)
|
2024-08-09 13:39:04 +00:00
|
|
|
router.route('/usage-whatsapp').post(authorization, registerWhatsappUsage)
|
2024-07-30 11:26:42 +00:00
|
|
|
router.route('/report').post(authorization, getUsage)
|
2024-07-30 15:01:48 +00:00
|
|
|
router.route('/api-call').post(authorization, registerAPICall)
|
|
|
|
router.route('/api-operation').post(authorization, registerOperation)
|
2024-07-30 17:25:33 +00:00
|
|
|
router.route('/api-register-all').post(authorization, registerAll)
|
2024-07-30 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = router
|