2025-11-11 12:36:06 +07:00
|
|
|
import express from 'express'
|
2025-11-11 17:55:41 +07:00
|
|
|
import { accountingSetup } from '../controllers/accountingSetup.js'
|
2025-11-11 15:11:56 +07:00
|
|
|
// import { authMiddleware } from '../middlewares/auth.js'
|
|
|
|
|
// import { sendResponse } from '../utils/response.js'
|
2025-11-11 12:36:06 +07:00
|
|
|
|
|
|
|
|
const router = express.Router()
|
2025-11-11 17:55:41 +07:00
|
|
|
const controller_accountingSetup_post = new accountingSetup()
|
2025-11-11 12:36:06 +07:00
|
|
|
|
2025-11-11 17:55:41 +07:00
|
|
|
router.post('/accountingSetup', async (req, res) => {
|
|
|
|
|
const result = await controller_accountingSetup_post.onNavigate(req, res)
|
|
|
|
|
if (result) return res.json(result)
|
|
|
|
|
})
|
2025-11-11 12:36:06 +07:00
|
|
|
|
2025-11-11 15:11:56 +07:00
|
|
|
// // ===================================================
|
|
|
|
|
// // 🔹 BIOMETRIC LOGIN
|
|
|
|
|
// // ===================================================
|
|
|
|
|
// router.post('/biometric/login', async (req, res) => {
|
|
|
|
|
// const data = await controller_login_post.onBiometricLogin(req, res)
|
|
|
|
|
// if (data)
|
|
|
|
|
// return sendResponse(res, 200, 'เข้าสู่ระบบผ่าน Biometric สำเร็จ', 'Biometric login succeed', data)
|
|
|
|
|
// })
|
2025-11-11 12:36:06 +07:00
|
|
|
|
2025-11-11 15:11:56 +07:00
|
|
|
// // ===================================================
|
|
|
|
|
// // 🔹 BIOMETRIC REGISTER (ต้อง login ก่อน)
|
|
|
|
|
// // ===================================================
|
|
|
|
|
// router.post('/biometric/register', authMiddleware, async (req, res) => {
|
|
|
|
|
// const data = await controller_login_post.onBiometricRegister(req, res)
|
|
|
|
|
// if (data)
|
|
|
|
|
// return sendResponse(res, 200, 'ผูก Biometric สำเร็จ', 'Biometric registered', data)
|
|
|
|
|
// })
|
2025-11-11 12:36:06 +07:00
|
|
|
|
2025-11-11 15:11:56 +07:00
|
|
|
// // ===================================================
|
|
|
|
|
// // 🔹 TOKEN RENEW (ต่ออายุ Token)
|
|
|
|
|
// // ===================================================
|
|
|
|
|
// router.post('/token/renew', authMiddleware, async (req, res) => {
|
|
|
|
|
// const data = await controller_login_post.onRenewToken(req, res)
|
|
|
|
|
// if (data)
|
|
|
|
|
// return sendResponse(res, 200, 'ออก Token ใหม่สำเร็จ', 'Token renewed', data)
|
|
|
|
|
// })
|
2025-11-11 12:36:06 +07:00
|
|
|
|
|
|
|
|
export default router
|