strapi-plugin-content-manager
Advanced tools
Comparing version 3.0.0-alpha.8.3 to 3.0.0-alpha.9
@@ -14,5 +14,9 @@ const _ = require('lodash'); | ||
qb.offset(_.toNumber(params.skip)); | ||
if (params.skip) { | ||
qb.offset(_.toNumber(params.skip)); | ||
} | ||
qb.limit(_.toNumber(params.limit)); | ||
if (params.limit) { | ||
qb.limit(_.toNumber(params.limit)); | ||
} | ||
}).fetchAll({ | ||
@@ -43,4 +47,3 @@ withRelated: this.associations.map(x => x.alias) | ||
const entry = await this | ||
.forge() | ||
.save(Object.keys(params.values).reduce((acc, current) => { | ||
.forge(Object.keys(params.values).reduce((acc, current) => { | ||
if (this._attributes[current].type) { | ||
@@ -52,2 +55,3 @@ acc[current] = params.values[current]; | ||
}, {})) | ||
.save() | ||
.catch((err) => { | ||
@@ -54,0 +58,0 @@ if (err.detail) { |
@@ -34,3 +34,4 @@ const _ = require('lodash'); | ||
.catch((err) => { | ||
const field = _.last(_.words(err.message.split('_')[0])); | ||
const message = err.message.split('index:'); | ||
const field = _.words(_.last(message).split('_')[0]); | ||
const error = { message: `This ${field} is already taken`, field }; | ||
@@ -126,2 +127,3 @@ | ||
); | ||
// Records to remove in the relation. | ||
@@ -128,0 +130,0 @@ const toRemove = _.differenceWith(response[current], params.values[current], (a, b) => |
{ | ||
"name": "strapi-plugin-content-manager", | ||
"version": "3.0.0-alpha.8.3", | ||
"version": "3.0.0-alpha.9", | ||
"description": "A powerful UI to easily manage your data.", | ||
"engines": { | ||
"node": ">= 8.0.0", | ||
"npm": ">= 5.3.0" | ||
}, | ||
"author": { | ||
"email": "hi@strapi.io", | ||
"name": "Strapi team", | ||
"url": "http://strapi.io" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "Strapi team", | ||
"email": "hi@strapi.io", | ||
"url": "http://strapi.io" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/strapi/strapi.git" | ||
}, | ||
"license": "MIT", | ||
"strapi": { | ||
@@ -48,4 +27,25 @@ "name": "Content Manager", | ||
"react-select": "^1.0.0-rc.5", | ||
"strapi-helper-plugin": "3.0.0-alpha.8.3" | ||
} | ||
"strapi-helper-plugin": "3.0.0-alpha.9" | ||
}, | ||
"author": { | ||
"name": "Strapi team", | ||
"email": "hi@strapi.io", | ||
"url": "http://strapi.io" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "Strapi team", | ||
"email": "hi@strapi.io", | ||
"url": "http://strapi.io" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/strapi/strapi.git" | ||
}, | ||
"engines": { | ||
"node": ">= 8.0.0", | ||
"npm": ">= 3.0.0" | ||
}, | ||
"license": "MIT" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1203645
7541