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

Record method for distributing merchandise #4733

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

kberzinch
Copy link
Member

Closes #4731

@@ -69,7 +69,7 @@ public function getDistribution(Merchandise $merchandise, User $user): JsonRespo
'status' => 'error',
'message' => self::NO_DTM,
],
status: 400
status: 404
Copy link
Member

Choose a reason for hiding this comment

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

I was getting a stack trace back on stage for a random non-existent GTID. From this it looks like that case should have been returning a JSON error though

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be coming from the route model binding here:

Route::bind('gtid', static fn (string $value): User => User::whereGtid($value)->firstOrFail());

The controller method is either invoked with a fully-hydrated User model or doesn't get invoked at all.

@kberzinch kberzinch merged commit e7dfad2 into main Jul 28, 2024
9 of 10 checks passed
@kberzinch kberzinch deleted the kristaps/merchandise-provided-via branch July 28, 2024 19:37
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.

Add distribution source to distribution model and API
2 participants