Showing
2 changed files
with
4 additions
and
4 deletions
@@ -42,13 +42,13 @@ const request = async({url, method, reqParams, context}) => { | @@ -42,13 +42,13 @@ const request = async({url, method, reqParams, context}) => { | ||
42 | headers | 42 | headers |
43 | }); | 43 | }); |
44 | } else if (apiInfo.ufo) { | 44 | } else if (apiInfo.ufo) { |
45 | - return await ufoAPI[method](`${apiInfo.path}`, params, { | 45 | + return await ufoAPI[method](`${apiInfo.path || ''}`, params, { |
46 | cache: cache, | 46 | cache: cache, |
47 | code: 200, | 47 | code: 200, |
48 | headers | 48 | headers |
49 | }); | 49 | }); |
50 | } else { | 50 | } else { |
51 | - return await yohoApi[method](`${apiInfo.path}`, params, { | 51 | + return await yohoApi[method](`${apiInfo.path || ''}`, params, { |
52 | code: 200, | 52 | code: 200, |
53 | cache: cache, | 53 | cache: cache, |
54 | headers | 54 | headers |
@@ -48,7 +48,7 @@ module.exports = async(req, res, next) => { | @@ -48,7 +48,7 @@ module.exports = async(req, res, next) => { | ||
48 | } else if (apiInfo.ufo) { | 48 | } else if (apiInfo.ufo) { |
49 | result = await apiCtx[method]({ | 49 | result = await apiCtx[method]({ |
50 | api: ufoAPI, | 50 | api: ufoAPI, |
51 | - url: apiInfo.path, | 51 | + url: apiInfo.path || '', |
52 | data: params, | 52 | data: params, |
53 | param: { | 53 | param: { |
54 | code: 200, | 54 | code: 200, |
@@ -58,7 +58,7 @@ module.exports = async(req, res, next) => { | @@ -58,7 +58,7 @@ module.exports = async(req, res, next) => { | ||
58 | } else { | 58 | } else { |
59 | result = await apiCtx[method]({ | 59 | result = await apiCtx[method]({ |
60 | data: params, | 60 | data: params, |
61 | - url: apiInfo.path, | 61 | + url: apiInfo.path || '', |
62 | param: { | 62 | param: { |
63 | code: 200, | 63 | code: 200, |
64 | cache: cache | 64 | cache: cache |
-
Please register or login to post a comment