Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8121c30d
Commit
8121c30d
authored
Dec 29, 2020
by
David Fernandez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a dedicated inner class for search results
parent
4ca69686
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
app/services/packages/nuget/search_service.rb
app/services/packages/nuget/search_service.rb
+7
-3
No files found.
app/services/packages/nuget/search_service.rb
View file @
8121c30d
...
...
@@ -17,8 +17,6 @@ module Packages
padding:
0
}.
freeze
RESULT
=
Struct
.
new
(
:results
,
:total_count
,
keyword_init:
true
).
freeze
def
initialize
(
current_user
,
project_or_group
,
search_term
,
options
=
{})
@current_user
=
current_user
@project_or_group
=
project_or_group
...
...
@@ -30,7 +28,7 @@ module Packages
end
def
execute
R
ESULT
.
new
(
R
esult
.
new
(
total_count:
non_paginated_matching_package_names
.
count
,
results:
search_packages
)
...
...
@@ -152,6 +150,12 @@ module Packages
def
per_page
[
@options
[
:per_page
],
MAX_PER_PAGE
].
min
end
class
Result
include
ActiveModel
::
Model
attr_accessor
:results
,
:total_count
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment