gg-express 1.0.72 → 1.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/GGExpress.js CHANGED
@@ -150,15 +150,26 @@ class GGExpress {
150
150
  let requireParamCode = `{${[requireParameterCode(), requireDataCode()]
151
151
  .filter((row) => row.length > 0)
152
152
  .join(",")}}`;
153
- return ` "${row.url}" : {
154
- requireParams : ${requireParamCode},
155
- responseStructure : {
156
- status : "SUCCESS" | "ERROR",
157
- message : string,
158
- parameter : {${genParamCodeParameter(row.responseStructure)}}, data : { ${genDataParamCode(row.responseStructure)} } ${isArray(row.responseStructure)}}
159
- } `;
153
+ let tempURL;
154
+ if (Array.isArray(row.url)) {
155
+ tempURL = row.url;
156
+ }
157
+ else {
158
+ tempURL = [tempURL];
159
+ }
160
+ return tempURL
161
+ .map((url) => {
162
+ return ` "${url}" : {
163
+ requireParams : ${requireParamCode},
164
+ responseStructure : {
165
+ status : "SUCCESS" | "ERROR",
166
+ message : string,
167
+ parameter : {${genParamCodeParameter(row.responseStructure)}}, data : { ${genDataParamCode(row.responseStructure)} } ${isArray(row.responseStructure)}}
168
+ } `;
169
+ })
170
+ .join(",");
160
171
  })
161
- .join(",");
172
+ .join(" , ");
162
173
  return rawString;
163
174
  };
164
175
  const getRoute = myExpressRouteList.filter((row) => row.method === "get");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg-express",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "description": "",
5
5
  "main": "dist/GGExpress.js",
6
6
  "scripts": {
package/src/GGExpress.ts CHANGED
@@ -389,19 +389,30 @@ export default class GGExpress<appName extends string> {
389
389
  .filter((row) => row.length > 0)
390
390
  .join(",")}}`
391
391
 
392
- return ` "${row.url}" : {
393
- requireParams : ${requireParamCode},
394
- responseStructure : {
395
- status : "SUCCESS" | "ERROR",
396
- message : string,
397
- parameter : {${genParamCodeParameter(
398
- row.responseStructure
399
- )}}, data : { ${genDataParamCode(row.responseStructure)} } ${isArray(
400
- row.responseStructure
401
- )}}
402
- } `
392
+ let tempURL
393
+ if (Array.isArray(row.url)) {
394
+ tempURL = row.url
395
+ } else {
396
+ tempURL = [tempURL]
397
+ }
398
+ return tempURL
399
+ .map((url) => {
400
+ return ` "${url}" : {
401
+ requireParams : ${requireParamCode},
402
+ responseStructure : {
403
+ status : "SUCCESS" | "ERROR",
404
+ message : string,
405
+ parameter : {${genParamCodeParameter(
406
+ row.responseStructure
407
+ )}}, data : { ${genDataParamCode(
408
+ row.responseStructure
409
+ )} } ${isArray(row.responseStructure)}}
410
+ } `
411
+ })
412
+ .join(",")
403
413
  })
404
- .join(",")
414
+ .join(" , ")
415
+
405
416
  return rawString
406
417
  }
407
418