@alevnyacow/nzmt 0.12.0 → 0.12.1
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/bin/cli.js +4 -4
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -861,7 +861,7 @@ function generateController(upperCase, lowerCase, crudService) {
|
|
|
861
861
|
injections = injections.concat(crudService)
|
|
862
862
|
}
|
|
863
863
|
|
|
864
|
-
const crudServiceLowercase = crudService ? crudService.substring(0, 1).
|
|
864
|
+
const crudServiceLowercase = crudService ? crudService.substring(0, 1).toLowerCase() + crudService.substring(1) : undefined
|
|
865
865
|
|
|
866
866
|
const importInjections = injections.map((i) => {
|
|
867
867
|
if (i.endsWith('Controller')) {
|
|
@@ -893,7 +893,7 @@ function generateController(upperCase, lowerCase, crudService) {
|
|
|
893
893
|
`\tschemas: {`,
|
|
894
894
|
`\t\tGET: {`,
|
|
895
895
|
`\t\t\tquery: z.union([`,
|
|
896
|
-
`\t\t\t\tValueObjects.Pagination.schema.extend(${crudServiceLowercase}Metadata.schemas.getList.payload.shape.filter.shape)
|
|
896
|
+
`\t\t\t\tValueObjects.Pagination.schema.extend(${crudServiceLowercase}Metadata.schemas.getList.payload.shape.filter.shape),`,
|
|
897
897
|
`\t\t\t\t${crudServiceLowercase}Metadata.schemas.getList.payload.shape.filter`,
|
|
898
898
|
`\t\t\t])`,
|
|
899
899
|
`\t\t\tresponse: ${crudServiceLowercase}Metadata.schemas.getList.response`,
|
|
@@ -945,12 +945,12 @@ function generateController(upperCase, lowerCase, crudService) {
|
|
|
945
945
|
`\t\t\treturn await this.${crudServiceLowercase}.getList({ filter, pagination: { pageSize, zeroBasedIndex } })`,
|
|
946
946
|
`\t\t}`,
|
|
947
947
|
`\t\treturn await this.${crudServiceLowercase}.getList({ filter: x })`,
|
|
948
|
-
|
|
948
|
+
`\t}`,
|
|
949
949
|
`\tdetails_GET = this.endpoints('details_GET', this.${crudServiceLowercase}.getDetails)`,
|
|
950
950
|
`\tPOST = this.endpoints('POST', this.${crudServiceLowercase}.create)`,
|
|
951
951
|
`\tPATCH = this.endpoints('PATCH', this.${crudServiceLowercase}.update)`,
|
|
952
952
|
`\tDELETE = this.endpoints('DELETE', this.${crudServiceLowercase}.delete)`,
|
|
953
|
-
].join('\n') : undefined
|
|
953
|
+
].join('\n') : undefined,
|
|
954
954
|
`}`
|
|
955
955
|
].filter(x => typeof x === 'string').join('\n'))
|
|
956
956
|
|