axe-api 0.18.0 → 0.18.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## [0.18.1 (2021-12-02)](https://github.com/axe-api/axe-api/compare/0.18.1...0.18.0)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- [#117](https://github.com/axe-api/axe-api/issues/117)
|
|
8
|
+
|
|
3
9
|
## [0.18.0 (2021-11-30)](https://github.com/axe-api/axe-api/compare/0.18.0...0.17.5)
|
|
4
10
|
|
|
5
11
|
### Fixed
|
package/package.json
CHANGED
package/src/handlers/store.js
CHANGED
|
@@ -45,7 +45,7 @@ export default async (context) => {
|
|
|
45
45
|
|
|
46
46
|
let [insertedPrimaryKeyValue] = await trx(model.instance.table)
|
|
47
47
|
.insert(formData)
|
|
48
|
-
.returning(
|
|
48
|
+
.returning(model.instance.primaryKey);
|
|
49
49
|
|
|
50
50
|
// If the user use a special primary key value, we should use that value
|
|
51
51
|
if (insertedPrimaryKeyValue === 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import IoC from "./../core/IoC.js";
|
|
2
2
|
import pluralize from "pluralize";
|
|
3
|
-
import { paramCase } from "change-case";
|
|
3
|
+
import { paramCase, camelCase } from "change-case";
|
|
4
4
|
import { RELATIONSHIPS, API_ROUTE_TEMPLATES } from "./../constants.js";
|
|
5
5
|
import Handlers from "./../handlers/index.js";
|
|
6
6
|
|
|
@@ -122,7 +122,7 @@ const createNestedRoutes = async (
|
|
|
122
122
|
await createRouteByModel(
|
|
123
123
|
model,
|
|
124
124
|
models,
|
|
125
|
-
`${urlPrefix}${resource}/:${
|
|
125
|
+
`${urlPrefix}${resource}/:${camelCase(relation.foreignKey)}/`,
|
|
126
126
|
model,
|
|
127
127
|
relation,
|
|
128
128
|
false
|