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

Fixed bySerial endpoint to always return a list #12328

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

snipe
Copy link
Owner

@snipe snipe commented Jan 10, 2023

Looks like in the older versions of showBySerial() we were always returning a list (collection) so this reverts that behavior back.

…n the last PR to keep that behavior consistent

Signed-off-by: snipe <snipe@snipe.net>
@what-the-diff
Copy link

what-the-diff bot commented Jan 10, 2023

  • Removed the if statement that was checking for a single result and returning it as an asset instead of collection.
  • Added return (new AssetsTransformer)->transformAssets($assets, $assets->count()); to always transform assets into collections regardless of count or deleted status.

@snipe snipe changed the title We were previously returning a collection - this reverts the change i… Fixed bySerial endpoint to always return a list Jan 10, 2023
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

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

This looks great!

@snipe snipe merged commit 005d6d3 into develop Jan 10, 2023
@snipe snipe deleted the fixes/revert_to_old_behavior_on_byserial branch January 10, 2023 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants