mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Merge branch 'data-transfer/transfer-tokens' of github.com:strapi/strapi into data-transfer/transfer-tokens
This commit is contained in:
commit
635c8a708d
@ -38,9 +38,9 @@ module.exports = {
|
|||||||
const { token: tokenService } = getService('transfer');
|
const { token: tokenService } = getService('transfer');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We trim both field to avoid having issues with either:
|
* We trim fields to avoid having issues with either:
|
||||||
* - having a space at the end or start of the value.
|
* - having a space at the end or start of the value
|
||||||
* - having only spaces as value;
|
* - having only spaces as value (so that an empty field can be caught in validation)
|
||||||
*/
|
*/
|
||||||
const attributes = {
|
const attributes = {
|
||||||
name: trim(body.name),
|
name: trim(body.name),
|
||||||
@ -68,9 +68,9 @@ module.exports = {
|
|||||||
|
|
||||||
const attributes = body;
|
const attributes = body;
|
||||||
/**
|
/**
|
||||||
* We trim both field to avoid having issues with either:
|
* We trim fields to avoid having issues with either:
|
||||||
* - having a space at the end or start of the value.
|
* - having a space at the end or start of the value
|
||||||
* - having only spaces as value;
|
* - having only spaces as value (so that an empty field can be caught in validation)
|
||||||
*/
|
*/
|
||||||
if (has('name', attributes)) {
|
if (has('name', attributes)) {
|
||||||
attributes.name = trim(body.name);
|
attributes.name = trim(body.name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user