diff options
Diffstat (limited to 'lib/api/lsif_data.rb')
-rw-r--r-- | lib/api/lsif_data.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/lsif_data.rb b/lib/api/lsif_data.rb index 6513973133a..a673ccb4af0 100644 --- a/lib/api/lsif_data.rb +++ b/lib/api/lsif_data.rb @@ -15,7 +15,7 @@ module API resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do segment ':id/commits/:commit_id' do params do - requires :path, type: String, desc: 'The path of a file' + requires :paths, type: Array, desc: 'The paths of the files' end get 'lsif/info' do authorize! :download_code, user_project @@ -30,7 +30,9 @@ module API authorize! :read_pipeline, artifact.job.pipeline file_too_large! if artifact.file.cached_size > MAX_FILE_SIZE - ::Projects::LsifDataService.new(artifact.file, @project, params).execute + service = ::Projects::LsifDataService.new(artifact.file, @project, params[:commit_id]) + + params[:paths].to_h { |path| [path, service.execute(path)] } end end end |