debian-mirror-gitlab/app/services/boards/visits/latest_service.rb

18 lines
373 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# 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