Commit c8832510080bbf59ec7774b08934f8ddeecc7426
1 parent
6485aa18
Exists in
master
and in
1 other branch
update mockup for project true cms
Showing
2 changed files
with
38 additions
and
1 deletions
Show diff stats
app.js
@@ -396,7 +396,7 @@ app.post('/api/v1/LG-API/notifySubscription', require('./lg').notifySubscription | @@ -396,7 +396,7 @@ app.post('/api/v1/LG-API/notifySubscription', require('./lg').notifySubscription | ||
396 | 396 | ||
397 | app.post('/goapi/profile/assetDetail', require('./ccbs').assetDetail); | 397 | app.post('/goapi/profile/assetDetail', require('./ccbs').assetDetail); |
398 | app.post('/goapi/profile/churnscore/offerlist', require('./ccbs').churnScoreOfferList); | 398 | app.post('/goapi/profile/churnscore/offerlist', require('./ccbs').churnScoreOfferList); |
399 | - | 399 | +app.get('/goapi/profile/external/customer/usageInfo/:type/:number', require('./ccbs').usageInfo); |
400 | 400 | ||
401 | app.get('/api/callback', require('./line').callback); | 401 | app.get('/api/callback', require('./line').callback); |
402 | 402 |
ccbs.js
@@ -115,4 +115,41 @@ module.exports.churnScoreOfferList = async (req, res) => { | @@ -115,4 +115,41 @@ module.exports.churnScoreOfferList = async (req, res) => { | ||
115 | res.status(200).send(response) | 115 | res.status(200).send(response) |
116 | } | 116 | } |
117 | 117 | ||
118 | +module.exports.usageInfo = async (req, res) => { | ||
119 | + console.log('===== GET usageInfo =====') | ||
120 | + console.log('url', req.originalUrl); | ||
121 | + console.log('headers', req.headers); | ||
122 | + console.log('query', req.query); | ||
123 | + console.log('params', req.params); | ||
124 | + console.log('body', req.body); | ||
125 | + | ||
126 | + let responseErr = { | ||
127 | + "code" : "404", | ||
128 | + "message" : "Not found" | ||
129 | + } | ||
130 | + | ||
131 | + let response = { | ||
132 | + "trueId": { | ||
133 | + "device": "WEB", | ||
134 | + "lastAccess": "27/12/2018 04:51:12" | ||
135 | + }, | ||
136 | + "trueYou": { | ||
137 | + "device": "WEB", | ||
138 | + "lastAccess": "27/12/2018 04:25:42" | ||
139 | + }, | ||
140 | + "iService": { | ||
141 | + "device": "IOS", | ||
142 | + "lastAccess": "27/12/2018 04:31:22" | ||
143 | + }, | ||
144 | + "trueWallet": { | ||
145 | + "device": "123", | ||
146 | + "lastAccess": "123" | ||
147 | + }, | ||
148 | + "tdgError": false, | ||
149 | + "TrueMoneyError": true | ||
150 | + } | ||
151 | + | ||
152 | + res.status(200).send(responseErr) | ||
153 | +} | ||
154 | + | ||
118 | 155 |