Skip to content

Conversation

@PThorpe92
Copy link
Member

No description provided.

@PThorpe92 PThorpe92 marked this pull request as draft November 9, 2023 23:44
@PThorpe92 PThorpe92 marked this pull request as ready for review November 9, 2023 23:44
if (!$platform) {
return response()->json(['error' => 'No matching platform connection found'], 401);
}
return new PlatformConnectionResource($platform);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PThorpe92 in order to be able to return the requisite Provider Platform data (and Connection state) to the v.1 UI this needs to return the ConsumerProviderResource::collection that was in the #3 request that you had integrated into your branch earlier when we collaborated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConsumerProviderResource?

The show function you have in the link returns

public function show(ConsumerPlatform $consumerPlatform)
    {
        return ConsumerPlatformResource::make($consumerPlatform);
    }

So because this is a show function and you have specified the ID in the URL, it should return a collection of all that consumer platforms connections? that does make sense.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Additionally it gets the state value of the Platform Connection and adds that to the json Provider Platform (for that particular Consumer Platform) response data

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

Successfully merging this pull request may close these issues.

4 participants