Skip to content

Commit 1cd914f

Browse files
committed
Add resourceConfig.generateId to disable automatic ID generation.
1 parent a6d495b commit 1cd914f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/routes/create.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ createRoute.register = () => {
3333
callback => {
3434
const theirs = request.params.data
3535
theirResource = _.assign(
36-
{
37-
id: uuid.v4(),
38-
type: request.params.type
39-
},
36+
{ type: request.params.type },
37+
(request.resourceConfig.generateId !== false) && { id: uuid.v4() },
4038
theirs.id && { id: theirs.id },
4139
theirs.attributes,
4240
{ meta: theirs.meta }

0 commit comments

Comments
 (0)