summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app
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
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')
-rw-r--r--usecaseui-portal/src/app/mock/routes.js7
-rw-r--r--usecaseui-portal/src/app/mock/server.js3
2 files changed, 7 insertions, 3 deletions
diff --git a/usecaseui-portal/src/app/mock/routes.js b/usecaseui-portal/src/app/mock/routes.js
index 56ff27c3..b25ada4f 100644
--- a/usecaseui-portal/src/app/mock/routes.js
+++ b/usecaseui-portal/src/app/mock/routes.js
@@ -100,13 +100,14 @@ module.exports =
"/uui-slicing/nsmf/resource/nssi/:environmentContext/instances/pageNo/:pageNo/pageSize/:pageSize": "/slicing_subnet_context",
"/uui-slicing/nsmf/task/:taskId/taskCreationInfo": "/slicing_taskCreationInfo",
"/uui-slicing/nsmf/task/:taskId/taskCreationProgress": "/slicing_taskCreationProgress",
+ "/PUT/uui-slicing/nsmf/task/auditInfo": "/PUT_task_auditInfo",
///////<-------------slicing_business--------->/////
"/uui-slicing/nsmf/resource/business/pageNo/:pageNo/pageSize/:pageSize": "/slicing_business_list",
"/uui-slicing/nsmf/resource/:businessStatus/business/pageNo/:pageNo/pageSize/:pageSize": "/slicing_business_list_activated",
- "/uui-slicing/nsmf/resource/:serviceId/activate": "/slicing_business_activate",
- "/uui-slicing/nsmf/resource/:serviceId/deactivate": "/slicing_business_activate",
- "/uui-slicing/nsmf/resource/:serviceId": "/slicing_business_activate",
+ "/PUT/uui-slicing/nsmf/resource/:serviceId/activate": "/slicing_business_activate",
+ "/PUT/uui-slicing/nsmf/resource/:serviceId/deactivate": "/slicing_business_activate",
+ "/DELETE/uui-slicing/nsmf/resource/:serviceId": "/slicing_business_activate",
"/uui-slicing/nsmf/resource/:serviceId/progress":"/getSlicingBusinessProgress",
///////<-------------slicing_nsi--------->/////
"/uui-slicing/nsmf/resource/nsi/:instanceStatus/instances/pageNo/:pageNo/pageSize/:pageSize": "/slicing_nsi_list_activated",
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();
})