lib/data_requests/deployed/lookup_user_by_uuid.rb
# frozen_string_literal: true
module DataRequests
module Deployed
class LookupUserByUuid
attr_reader :uuid
def initialize(uuid)
@uuid = uuid
end
def call
User.find_by(uuid: uuid) ||
ServiceProviderIdentity.find_by(uuid: uuid)&.user
end
end
end
end