Skip to content
New issue

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

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

Already on GitHub? # 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!

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

No branches or pull requests

2 participants