@alevnyacow/nzmt 0.15.3 → 0.15.4
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 +2 -2
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -972,8 +972,8 @@ function generateController(upperCase, lowerCase, crudService) {
|
|
|
972
972
|
`\t\treturn await this.${crudServiceLowercase}.getList({ filter: x })`,
|
|
973
973
|
`\t})`,
|
|
974
974
|
``,
|
|
975
|
-
`\tdetails_GET = this.endpoints('details_GET', async (payload, { endpointError ) => {`,
|
|
976
|
-
`\t\tconst details = await this.${crudServiceLowercase}.getDetails`,
|
|
975
|
+
`\tdetails_GET = this.endpoints('details_GET', async (payload, { endpointError }) => {`,
|
|
976
|
+
`\t\tconst details = await this.${crudServiceLowercase}.getDetails(payload)`,
|
|
977
977
|
`\t\tif (!details) { throw endpointError('No data was found', 404) }`,
|
|
978
978
|
`\t\treturn details`,
|
|
979
979
|
`\t})`,
|