Merge branch 'master' into webhooks/tests

This commit is contained in:
virginieky 2020-01-30 15:52:46 +01:00 committed by GitHub
commit 8b62d3c34d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 3 deletions

View File

@ -213,7 +213,7 @@ And for your files, they have to be prefixed by `files`.
Example here with cover attribute `files.cover`.
::: tip
If you want to upload files for a component, you will have to specify the inidex of the item you wan to add the file.
If you want to upload files for a component, you will have to specify the index of the item you want to add the file.
Example `files.my_component_name[the_index].attribute_name`
:::

View File

@ -213,5 +213,9 @@
"Auth.link.forgot-password": "Esqueceu sua senha?",
"Auth.link.ready": "Pronto para entrar?",
"app.containers.App.notification.error.init": "Ocorreu um erro ao solicitar a API",
"components.Input.error.password.noMatch": "As senhas não conferem"
"components.Input.error.password.noMatch": "As senhas não conferem",
"form.button.done": "Terminar",
"form.button.finish": "Finalizar",
"notification.form.error.fields": "O formulário contém alguns erros",
"global.prompt.unsaved": "Você tem certeza que deseja sair desta página? Todas as suas modificacões serão perdidas"
}

View File

@ -229,7 +229,8 @@ module.exports = ({ models, target, plugin = false }, ctx) => {
const refToStrapiRef = obj => {
const ref = obj.ref;
let plainData = typeof ref.toJSON === 'function' ? ref.toJSON() : ref;
let plainData =
ref && typeof ref.toJSON === 'function' ? ref.toJSON() : ref;
if (typeof plainData !== 'object') return ref;

View File

@ -185,6 +185,7 @@ module.exports = {
request: Object.assign(_.clone(context.request), {
graphql: null,
}),
response: _.clone(context.response),
});
// Execute policies stack.

View File

@ -246,6 +246,7 @@ module.exports = {
request: Object.assign(_.clone(context.request), {
graphql: null,
}),
response: _.clone(context.response),
});
// Note: we've to used the Object.defineProperties to reset the prototype. It seems that the cloning the context