add multi-currency master CRUD (Phase 2)

- add currencyadapter.js: list (with pagination+keyword), detail, history, create, update (auto-log rate change to tbl_currency_log), delete (soft), convertAmount helper
- add controllers/currency.js and routes/currency.js, auto-mounted at /currency
- update dbproc.js: configurable port via HOSTPORT env variable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Rizki
2026-03-23 20:52:29 +07:00
parent b2c866d793
commit 26d22355fa
4 changed files with 415 additions and 1 deletions

13
routes/currency.js Normal file
View File

@ -0,0 +1,13 @@
const express = require('express');
const currencycontroller = require('../controllers/currency');
const jwtauth = require('../middlewares/auth.js');
const router = express.Router();
router.get('/list', [jwtauth], currencycontroller.getCurrencyList);
router.get('/detail/:id', [jwtauth], currencycontroller.getCurrencyDetail);
router.get('/history/:id', [jwtauth], currencycontroller.getCurrencyHistory);
router.post('/create', [jwtauth], currencycontroller.createCurrency);
router.put('/update/:id', [jwtauth], currencycontroller.updateCurrency);
router.delete('/delete/:id', [jwtauth], currencycontroller.deleteCurrency);
module.exports = router;