- 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>
14 lines
651 B
JavaScript
14 lines
651 B
JavaScript
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;
|