Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create/Update functions - Wrong 'data' structure in some cases #101

Open
dajanvulaj opened this issue Apr 4, 2024 · 1 comment
Open

Comments

@dajanvulaj
Copy link
Contributor

I was trying to create a user from the API and came across this problem.
When using the create function, the data is always restructured as below:

        $data = [
            'data' => (array)$data,
            'trigger' => $triggers,
        ];

But in some cases the API accepts the data in a different way.
For example for Users API the data should be structured as follows:

        $data = [
            'users' => (array)$data
        ];

Users API

@Skullbock
Copy link
Contributor

hi! can you send a PR for this? I think you just need to override the Users module create and update methods to structure the data differently!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants