debian-mirror-gitlab/app/services/boards/visits/latest_service.rb
2018-12-13 13:39:08 +05:30

17 lines
373 B
Ruby

# frozen_string_literal: true
module Boards
module Visits
class LatestService < Boards::BaseService
def execute
return nil unless current_user
if parent.is_a?(Group)
BoardGroupRecentVisit.latest(current_user, parent)
else
BoardProjectRecentVisit.latest(current_user, parent)
end
end
end
end
end