strapi-community / strapi-plugin-transformer

A plugin for Strapi Headless CMS that provides the ability to transform the API request or response.
https://market.strapi.io/plugins/strapi-plugin-transformer
MIT License
139 stars 21 forks source link

Error de Login #93

Closed alejandrojosue closed 1 year ago

alejandrojosue commented 1 year ago

El plugin es genial! Me reestructura los datos de respuestas de una manera más óptima y legible. Pero por algún motivo no podía hacer login. Probé muchas cosas y después de muchas horas, pude detectar que lo que me generaba un error 400, ya que me decía que no había puesto el identifier ni el password en el body de la ruta http://localhost:1337/api/auth/local Pero siempre lo ponía sin falta. Pero al remover este paquete pude realizar el auth sin problema alguno. // .. 'transformer': { enabled: true, config: { responseTransforms: { removeAttributesKey: true, removeDataKey: true, }, requestTransforms: { wrapBodyWithDataKey: true }, hooks: { preResponseTransform: (ctx) => console.log('hello from the preResponseTransform hook!'), postResponseTransform: (ctx) => console.log('hello from the postResponseTransform hook!') }, contentTypeFilter: { mode: 'allow', uids: { 'api::categoria.categoria': true } }, plugins: { ids: { 'slugify': true, } } } }, así tenía la configuración del plugin.js y me encantaría que me orientaran en caso de que lo haya aplicado mal o que corrijan el error en caso de defecto de plugin. Este plugin me gustó pero al presentarse este error y falta de explicación, ya que soy un novato aún con esto y la documentación no me ha ayudado tanto, un vídeo si es posible sería grandioso explicando como usar este plugin de forma eficiente.

ComfortablyCoding commented 1 year ago

Strange, that should not be the case. Thanks for the report, I will see if I can reproduce this issue.

ComfortablyCoding commented 1 year ago

This should now be fixed in the latest release (v3.1.1)