From 1de2e1fabd073d2cd1393ff8b62e67bfaa7e98ae Mon Sep 17 00:00:00 2001 From: Nattapon W Date: Mon, 1 Nov 2021 17:53:08 +0700 Subject: [PATCH] update mockup --- app.js | 4 ++++ ccbs.js | 2 +- ccp.js | 2 +- int.js | 2 +- sms.js | 22 ++++++++++++++++++++++ 5 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 sms.js diff --git a/app.js b/app.js index c17dd84..d3d59a8 100644 --- a/app.js +++ b/app.js @@ -411,6 +411,8 @@ app.get('/FinancialTransaction/MGPaymentInfo/getPaymentList/:ban/:pageSize/:page app.post('/MGContractInfo/MGContractInfo/getCurrentContractList', require('./intx').getCurrentContractList); app.post('/MGCustomerInfo/MGCustomerInfo/getAccountInfo', require('./intx').getAccountInfo); +app.get('/v1/get_BillingAddress/:accountId/:pageNo', require('./postpay_true').getBillingAddress); //postpay + app.post('/v1/get_AccountCustomerInfo/', require('./postpay_true').getAccountCustomerInfo); //postpay app.get('/v1/get_LastInvoiceList/:accountId/:pageSize', require('./postpay_true').getLastInvoiceList); //postpay app.post('/v1/OSB/get_LastDocumentList/', require('./postpay_true').getLastDocumentList); //postpay @@ -432,6 +434,8 @@ app.post('/CCPGW_ServiceWeb/Services/QryBalanceList', express.text({type:"*/*"}) app.get('/api/callback', require('./line').callback); +app.post('/sendSMS', require('./sms').sendSMS); + app.get('/api/random/leader', function (req, res) { const months = ["เกมส์", "โน๊ต setup", "โน๊ต วัศรุต", "แบงค์", "มอส", "ปิ๊ค", "เต้นพอไม่ต้องตื่น", "เปา", "นัท", "kik", "new", "ann","na", "boky", "eve", "miki", "pla", "sugar"]; // const months = [ "ann"]; diff --git a/ccbs.js b/ccbs.js index 8056199..6ba9ad7 100644 --- a/ccbs.js +++ b/ccbs.js @@ -271,7 +271,7 @@ module.exports.accumulationUOMGroupList = async (req, res) => { "rerateIndicator": "N" } - res.status(200).send(responseErr) + res.status(200).send(response) } module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => { diff --git a/ccp.js b/ccp.js index a7ccebc..0f0255b 100644 --- a/ccp.js +++ b/ccp.js @@ -122,7 +122,7 @@ module.exports.balance = async (req, res) => { Calling_Bonus 8667338666 2 - 0 + 1000 2018-03-13 07-21-06 2050-12-31 07-21-06 2018-12-27 17-29-19 diff --git a/int.js b/int.js index 3da74c2..8700909 100644 --- a/int.js +++ b/int.js @@ -1088,7 +1088,7 @@ module.exports.getTdsList = async (req, res) => { } } - res.status(201).send(response) + res.status(200).send(response) } module.exports.getFinalChargeInfo = async (req, res) => { diff --git a/sms.js b/sms.js new file mode 100644 index 0000000..ec5ef81 --- /dev/null +++ b/sms.js @@ -0,0 +1,22 @@ +module.exports.sendSMS = async (req, res) => { + console.log('===== GET sendSMS =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + + let response = ` + OK + SUCCESS + 1502000283578 + ` + + + let responseErr = ` + ERR + CORP:INVALID_FROM + + ` + + res.send(response) +} \ No newline at end of file -- libgit2 0.21.2