Skip to content
Snippets Groups Projects

Refactor LfsImportService and ImportService

Merged Francisco Javier López requested to merge fj-refactor-lfs-import-code into master
All threads resolved!
Files
11
@@ -4,7+4,7 @@
# oids provided
module Projects
module LfsPointers
class LfsDownloadLinkListService < BaseService
DOWNLOAD_ACTION = 'download'.freeze
DownloadLinksError = Class.new(StandardError)
@@ -21,7+21,7 @@
# This method accepts two parameters:
# - oids: hash of oids to query. The structure is { lfs_file_oid => lfs_file_size }
#
# Returns a hash with the structure { lfs_file_oids => download_link }
# Returns an array of LfsDownloadObject
def execute(oids)
return {} unless project&.lfs_enabled? && remote_uri && oids.present?
return [] unless project&.lfs_enabled? && remote_uri && oids.present?
get_download_links(oids)
end
Loading