Skip to content

Commit 1569374

Browse files
committed
Revert refactoring of the /source/:project/:package API endpoint
The refactoring lead to throwing an error on the `extend` parameter: ``` Server returned an error: HTTP Error 400: Bad Request not boolean ```
1 parent 333afd7 commit 1569374

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/api/app/controllers/source_package_controller.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ def show
2020

2121
show_package_issues && return if params[:view] == 'issues'
2222

23-
backend_params = params.slice(*%i[rev linkrev emptylink deleted expand view extension lastworking withlinked meta product
24-
parse repository arch]).permit!.to_h
25-
26-
render xml: Backend::Api::Sources::Package.files(@target_project_name, @target_package_name, backend_params)
23+
path = request.path_info
24+
path += build_query_from_hash(params, %i[rev linkrev emptylink
25+
expand view extension
26+
lastworking withlinked meta
27+
deleted parse arch
28+
repository product nofilename])
29+
30+
pass_to_backend(path)
2731
end
2832

2933
# DELETE /source/:project/:package

0 commit comments

Comments
 (0)