Is there a way to use this plugin within my API controllers? #45
Unanswered
selected-pixel-jameson
asked this question in
Q&A
Replies: 3 comments 2 replies
-
Yes the transform functionality is just a service of the plugin so it can be used anywhere you have access to the strapi obj. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ComfortablyCoding Could you provide an example of this? I was having trouble trying to figure out exactly how to do that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
It should just be // ..
const data = dataFromEvent;
const transforms = {removeAttributesKey: true, removeDataKey: true };
const transformedData = strapi.services('plugin::transformer.transformService).transformResponse(transforms,data);
// .. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to use this plugin within my API controllers? For example I'm hooking into a process when a model is updated and I want to send a request to a third-party service with this data.
Beta Was this translation helpful? Give feedback.
All reactions