summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/mock
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-05 09:59:07 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-05 10:00:25 +0800
commitb3762dcda5557f4db06718423fbb041dbd5c24b6 (patch)
tree787bf1d70f5c4b2865e48488eac1b74fb8b090cd /usecaseui-portal/src/app/mock
parent60011b80da470f37bd1512b3fbd05b8243ed42b6 (diff)
feat: Convert put, delete, and post requests to get requests
Change-Id: I1a61452771a0c60541190807a8e4e230c39ae41e Issue-ID: USECASEUI-352 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/mock')
-rw-r--r--usecaseui-portal/src/app/mock/server.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/mock/server.js b/usecaseui-portal/src/app/mock/server.js
index 010f480d..f8e6b194 100644
--- a/usecaseui-portal/src/app/mock/server.js
+++ b/usecaseui-portal/src/app/mock/server.js
@@ -19,6 +19,7 @@ const server = jsonServer.create();
const middlewares = jsonServer.defaults();
const customersRouters = require('./routes');
const baseUrl = "/usecaseui-server/v1";
+const nsmfBaseUrl = "/uui-slicing/nsmf";
// Set default middlewares (logger, static, cors and no-cache)
server.use(middlewares);
@@ -102,6 +103,18 @@ server.delete(`${baseUrl}/*`, (req, res, next) => {
req.method = 'GET';
next();
})
+server.put(`${nsmfBaseUrl}/*`, (req, res, next) => {
+ req.method = 'GET';
+ next();
+})
+server.post(`${nsmfBaseUrl}/*`, (req, res, next) => {
+ req.method = 'GET';
+ next();
+})
+server.delete(`${nsmfBaseUrl}/*`, (req, res, next) => {
+ req.method = 'GET';
+ next();
+})
server.listen(3002, () => {
console.log('Mock Server is successfully running on port 3002 😁')