Created
July 2, 2018 10:15
-
-
Save groony/fe11e197a7eb28afb9569b5c6efb7790 to your computer and use it in GitHub Desktop.
controller example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Api | |
module V1 | |
class SsoController < ApiController | |
before_action :authenticate | |
def show | |
service = ::Sso::Show.new(params_h.merge(current_user: current_user)) | |
service.execute! | |
if service.success? | |
render json: ::V1::SsoSerializer.new(current_user) | |
else | |
render_errors(service.errors) | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment