BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ebfe269e
Commit
ebfe269e
authored
Dec 14, 2017
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolving conflict
parent
a673d25d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
groups.rb
lib/api/groups.rb
+6
-5
No files found.
lib/api/groups.rb
View file @
ebfe269e
...
...
@@ -52,19 +52,21 @@ module API
optional
:sort
,
type:
String
,
values:
%w[asc desc]
,
default:
'asc'
,
desc:
'Sort by asc (ascending) or desc (descending)'
use
:pagination
end
get
do
def
find_groups
(
params
)
find_params
=
{
all_available:
params
[
:all_available
],
owned:
params
[
:owned
],
custom_attributes:
params
[
:custom_attributes
]
custom_attributes:
params
[
:custom_attributes
],
owned:
params
[
:owned
]
}
find_params
[
:parent
]
=
find_group!
(
params
[
:id
])
if
params
[
:id
]
groups
=
GroupsFinder
.
new
(
current_user
,
find_params
).
execute
groups
=
groups
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
groups
=
groups
.
where
.
not
(
id:
params
[
:skip_groups
])
if
params
[
:skip_groups
].
present?
groups
=
groups
.
reorder
(
params
[
:order_by
]
=>
params
[
:sort
])
present_groups
params
,
groups
groups
end
def
find_group_projects
(
params
)
...
...
@@ -98,7 +100,6 @@ module API
get
do
groups
=
find_groups
(
params
)
present_groups
params
,
groups
>>>>>>>
65
b7a7a063
...
Merge
branch
'sh-optimize-groups-api'
into
'master'
end
desc
'Create a group. Available only for users who can create groups.'
do
...
...
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