- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Proposition Jonathan #3
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
| in 500, { error: message } | ||
| Result::Failure.new(Array(message)) | ||
| in 500, { errors: messages } | ||
| Result::Failure.new(Array(messages)) | ||
| in 500, message | ||
| Result::Failure.new(Array(message)) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice use of Array(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je trouve ça redondant de devoir refaire sans arrêt Result::Failure.new(Array(message))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouais, malheureusement, sans la possibilité de faire des alternate avec assignation, c'est bloqué comme ça
Ce serait effectivement cool de juste
in 500, { error: messages } | { errors: messages } | String => messages
  Result::Failure.new(Array(messages))There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" il y a presque 5 ans " bon bah c'est pas près d'être possible 😄
| Result::Failure.new([]) | ||
| in 200, {} | ||
| Result::Success.new(nil) | ||
| in 200, { payload: { **payload } } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense que tu peux simplement utiliser
| in 200, { payload: { **payload } } | |
| in 200, { payload: } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
effectivement, pas mal comme ça !
No description provided.