budgetAdd: problematic req.headers & placeholder projectSearch*

Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
2025-11-17 13:59:51 +07:00
parent 9499509dba
commit c6aff996d6
7 changed files with 179 additions and 21 deletions

View File

@@ -1,23 +1,26 @@
import express from 'express'
// import { budgetSetup } from '../controllers/budgetSetupController.js'
import { budgetSearch } from '../controllers/budgetSearchController.js'
import { budgetAdd } from '../controllers/budgetAddController.js'
// import { authMiddleware } from '../middlewares/auth.js'
// import { sendResponse } from '../utils/response.js'
const router = express.Router()
const controller_budgetSearch_get = new budgetSearch()
const controller_budgetAdd_put = new budgetAdd()
router.post('/budgetSetup', async (req, res) => {
const result = await controller_budgetSetup_post.onNavigate(req, res)
if (result) return res.json(result)
})
// router.put('/budgetadd', async (req, res) => {
// router.post('/budgetSetup', async (req, res) => {
// const result = await controller_budgetSetup_post.onNavigate(req, res)
// if (result) return res.json(result)
// })
router.get('/budgetsearch', async (req, res) => {
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) => {
const result = await controller_budgetSearch_get.onNavigate(req, res)
if (result) return res.json(result)
})