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

Update #23

Merged
merged 4 commits into from
Apr 19, 2024
Merged

Update #23

merged 4 commits into from
Apr 19, 2024

Conversation

Nesze
Copy link
Member

@Nesze Nesze commented Apr 19, 2024

  • Add custom event support
  • Unexport internal helper
  • Allow dash separator in form param, i.e. castle-request-token

@Nesze Nesze requested a review from a team as a code owner April 19, 2024 13:24
context.go Outdated
Comment on lines 72 to 76
return r.Form.Get("castle_request_token")
if tkn := r.Form.Get("castle_request_token"); tkn != "" {
return tkn
}

return r.Form.Get("castle-request-token")
Copy link

Choose a reason for hiding this comment

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

I don't think I get this; doesn't the return statement at the end also capture the if block above? 🤔

Copy link

Choose a reason for hiding this comment

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

Ah, one is - and the other is _ 🤦

Copy link
Member

@rcrowe rcrowe Apr 19, 2024

Choose a reason for hiding this comment

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

The parameters are slightly different between the two calls.

Alternatively, you could define these as validTokenNames := []string{...} & then loop over each checking them?

@Nesze Nesze merged commit 6d6a3b0 into master Apr 19, 2024
5 checks passed
@Nesze Nesze deleted the update branch April 19, 2024 15:19
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.

3 participants