bettermail/portal/app/controllers/api/v1/users_controller.rb
2022-11-12 02:27:46 +01:00

14 lines
299 B
Ruby

class Api::V1::UsersController < Api::AuthenticatedApiController
skip_before_action :authenticate_user!, only: [ :auth]
def auth
unless user_signed_in?
render json: { success: false }
return
end
render json: { success: true, user: current_user.json_payload}
end
end