2025-11-17 09:03:36 +07:00
|
|
|
import express from 'express'
|
2025-11-17 13:59:51 +07:00
|
|
|
// import { budgetSetup } from '../controllers/budgetSetupController.js'
|
2025-11-17 11:36:04 +07:00
|
|
|
import { budgetSearch } from '../controllers/budgetSearchController.js'
|
2025-11-17 13:59:51 +07:00
|
|
|
import { budgetAdd } from '../controllers/budgetAddController.js'
|
2025-11-17 09:03:36 +07:00
|
|
|
|
|
|
|
|
// import { authMiddleware } from '../middlewares/auth.js'
|
|
|
|
|
// import { sendResponse } from '../utils/response.js'
|
|
|
|
|
|
|
|
|
|
const router = express.Router()
|
2025-11-17 11:36:04 +07:00
|
|
|
const controller_budgetSearch_get = new budgetSearch()
|
2025-11-17 13:59:51 +07:00
|
|
|
const controller_budgetAdd_put = new budgetAdd()
|
2025-11-17 09:03:36 +07:00
|
|
|
|
2025-11-17 13:59:51 +07:00
|
|
|
// router.post('/budgetSetup', async (req, res) => {
|
2025-11-17 11:36:04 +07:00
|
|
|
// const result = await controller_budgetSetup_post.onNavigate(req, res)
|
|
|
|
|
// if (result) return res.json(result)
|
|
|
|
|
// })
|
2025-11-17 09:03:36 +07:00
|
|
|
|
2025-11-17 13:59:51 +07:00
|
|
|
router.post('/budgetadd', async (req, res) => {
|
|
|
|
|
const result = await controller_budgetAdd_put.onNavigate(req, res)
|
|
|
|
|
if (result) return res.json(result)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
router.post('/budgetsearch', async (req, res) => {
|
2025-11-17 11:36:04 +07:00
|
|
|
const result = await controller_budgetSearch_get.onNavigate(req, res)
|
2025-11-17 09:03:36 +07:00
|
|
|
if (result) return res.json(result)
|
|
|
|
|
})
|
|
|
|
|
|
2025-11-17 11:36:04 +07:00
|
|
|
// router.get('/projectsearch', async (req, res) => {
|
|
|
|
|
// const result = await controller_budgetSetup_post.onNavigate(req, res)
|
|
|
|
|
// if (result) return res.json(result)
|
2025-11-17 09:03:36 +07:00
|
|
|
// })
|
|
|
|
|
|
2025-11-17 11:36:04 +07:00
|
|
|
// router.put('/budgetexpense', async (req, res) => {
|
|
|
|
|
// const result = await controller_budgetSetup_post.onNavigate(req, res)
|
|
|
|
|
// if (result) return res.json(result)
|
2025-11-17 09:03:36 +07:00
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default router
|