mirror of
https://github.com/strapi/strapi.git
synced 2025-12-02 18:13:16 +00:00
Merge branch 'master' into feature/groups
This commit is contained in:
commit
dc8045778b
@ -21,7 +21,10 @@ To disable the prefix, add the `prefix` attribute to each concerned route, like
|
||||
"method": "GET",
|
||||
"path": "/my-plugin-route",
|
||||
"handler": "MyPlugin.action",
|
||||
"prefix": false
|
||||
"config": {
|
||||
"policies": [],
|
||||
"prefix": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -329,22 +329,17 @@ module.exports = {
|
||||
{}
|
||||
);
|
||||
|
||||
await Promise.all(relationUpdates);
|
||||
|
||||
delete values[this.primaryKey];
|
||||
if (!_.isEmpty(values)) {
|
||||
relationUpdates.push(
|
||||
this.forge({
|
||||
[this.primaryKey]: getValuePrimaryKey(params, this.primaryKey),
|
||||
}).save(values, {
|
||||
patch: true,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
relationUpdates.push(Promise.resolve(_.assign(response, params.values)));
|
||||
await this.forge({
|
||||
[this.primaryKey]: getValuePrimaryKey(params, this.primaryKey),
|
||||
}).save(values, {
|
||||
patch: true,
|
||||
});
|
||||
}
|
||||
|
||||
// Update virtuals fields.
|
||||
await Promise.all(relationUpdates);
|
||||
|
||||
return await this.forge({
|
||||
[this.primaryKey]: getValuePrimaryKey(params, this.primaryKey),
|
||||
}).fetch({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user