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 +19 -8
- package/package.json +1 -1
- package/src/GGExpress.ts +23 -12
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
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
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
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
|
|