@apso/cli 0.7.0 → 0.7.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/dist/lib/controller.js
CHANGED
|
@@ -51,11 +51,13 @@ const createController = async (apiBaseDir, entity, relationshipMap) => {
|
|
|
51
51
|
const svcName = `${entityName}Service`;
|
|
52
52
|
const ctrlName = `${entityName}Controller`;
|
|
53
53
|
const pluralEntityName = (0, pluralize_1.default)(entityName);
|
|
54
|
+
const primaryKeyType = entity.primaryKeyType || "serial"; // Default to 'serial' if not specified
|
|
54
55
|
const data = {
|
|
55
56
|
svcName,
|
|
56
57
|
ctrlName,
|
|
57
58
|
entityName,
|
|
58
59
|
pluralEntityName,
|
|
60
|
+
primaryKeyType,
|
|
59
61
|
associations: [...new Set(relationships)],
|
|
60
62
|
nestedJoinsFile,
|
|
61
63
|
};
|
|
@@ -15,6 +15,13 @@ import {<%= it.svcName %>} from './<%= it.entityName %>.service';
|
|
|
15
15
|
update: <%= it.entityName %>,
|
|
16
16
|
replace: <%= it.entityName %>,
|
|
17
17
|
},
|
|
18
|
+
params: {
|
|
19
|
+
id: {
|
|
20
|
+
field: 'id',
|
|
21
|
+
type: 'string',
|
|
22
|
+
primary: true,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
18
25
|
query: {
|
|
19
26
|
/**
|
|
20
27
|
* commenting out limit and pagination because of an issue with Crud lib: https://github.com/nestjsx/crud/issues/777
|
package/oclif.manifest.json
CHANGED