fga-eps-mds/2019.2-Vsign

View on GitHub
backend/app/graphql/mutations/login_by_token.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Mutations
  class LoginByToken < BaseMutation
    argument :token, String, required: true

    type Types::UserType

    def resolve(token: nil)
      contract = Contract.find_by(token: token)
      puts contract.user
      User.find_for_authentication(email: contract.user.email)
    end

  end
end