summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/mock/server.js
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-06 21:30:05 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-06 21:30:47 +0800
commit75baba3816940c053bb00b208e37b5b0887d9b9c (patch)
tree4ff362ec4e2ebdd74b72d80594f7f41bf57d5f83 /usecaseui-portal/src/app/mock/server.js
parentcf3ab1719db063b3312745175a8ca0b627be36c5 (diff)
feat: Optimize json-server interception logic
Change-Id: I84b31293793064e784d91a7007834470581dc674 Issue-ID: USECASEUI-368 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/mock/server.js')
-rw-r--r--usecaseui-portal/src/app/mock/server.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/mock/server.js b/usecaseui-portal/src/app/mock/server.js
index f8e6b194..930f500b 100644
--- a/usecaseui-portal/src/app/mock/server.js
+++ b/usecaseui-portal/src/app/mock/server.js
@@ -105,14 +105,17 @@ server.delete(`${baseUrl}/*`, (req, res, next) => {
})
server.put(`${nsmfBaseUrl}/*`, (req, res, next) => {
req.method = 'GET';
+ req.url = '/PUT'+req.url;
next();
})
server.post(`${nsmfBaseUrl}/*`, (req, res, next) => {
req.method = 'GET';
+ req.url = '/POST'+req.url;
next();
})
server.delete(`${nsmfBaseUrl}/*`, (req, res, next) => {
req.method = 'GET';
+ req.url = '/DELETE'+req.url;
next();
})