You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can simplify success and failure responses like this:
# Responds and returns true (for regular responses)respond(options,:ok,entity: options['model']# optional (default is nil),headers: {},# optionaldecorator: Decorator::Instance,# optional)# Responds and returns false (for errors)respond!(options,:not_found,entity: Pragma::Operation::Error.new(error_type: :not_found,error_message: 'The requested resource could not be found.',),headers: {},decorator: Pragma::Decorator::Error,)# Shortcut for erroring (all arguments optional)fail!(options,:not_found,error_type: :not_found,error_message: 'The requested resource could not be found.',headers: {},)
The text was updated successfully, but these errors were encountered:
Some work was started around this in #4 but I don't think it was going in the right direction, as the helpers introduced too much complexity. Still not sure what a good implementation might look like.
Responding right now is very cumbersome in custom operations, e.g.
We can simplify success and failure responses like this:
The text was updated successfully, but these errors were encountered: