Skip to content

when creating a component through the API component_group_id does not get populated in the database table #225

@sconnole

Description

@sconnole

When trying to create a new component attached to a group the component_group_id does not get properly transformed to componentGroupId.

I've tried using cURL and python per the documentation https://docs.cachethq.io/api-reference/components/create-component.

The component will create successfully in the database, but component_group_id is always null. I attached a screenshot of the result when dumping the data in the store method for the ComponentController. src/Http/Controllers/Api/ComponentController.php

    public function store(CreateComponentRequestData $data, CreateComponent $createComponentAction)
    {
        $this->guard('components.manage');
        dd($data);
        $component = $createComponentAction->handle(
            $data,
        );

        return ComponentResource::make($component);
    }

Image

interestingly there is a test case that should cover this scenario and when I run this test it completes successfully. https://github.com/cachethq/core/blob/main/tests/Feature/Api/ComponentTest.php#L218

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions