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
36b6cac8
Commit
36b6cac8
authored
Nov 30, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix new API endpoint
parent
b3b89ec0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/models/geo_node.rb
app/models/geo_node.rb
+3
-3
lib/api/geo_nodes.rb
lib/api/geo_nodes.rb
+3
-3
No files found.
app/models/geo_node.rb
View file @
36b6cac8
...
...
@@ -164,14 +164,14 @@ class GeoNode < ActiveRecord::Base
end
end
def
project_registries_by
(
type:
nil
)
def
filtered_project_registries
(
type
=
nil
)
case
type
when
'repository'
project_registries
.
failed_repos
when
'wiki'
project_registries
.
failed_
repo
s
project_registries
.
failed_
wiki
s
else
project_registries
project_registries
.
failed
end
end
...
...
lib/api/geo_nodes.rb
View file @
36b6cac8
...
...
@@ -87,10 +87,10 @@ module API
end
params
do
requires
:id
,
type:
Integer
,
desc:
'The ID of the node'
optional
:type
,
type:
String
,
desc:
'Type of failure (repository/wiki)'
optional
:type
,
type:
String
,
values:
%w[wiki repository]
,
desc:
'Type of failure (repository/wiki)'
use
:pagination
end
get
':id/failures
/:type
'
do
get
':id/failures'
do
unless
Gitlab
::
Geo
.
current_node
.
id
==
params
[
:id
]
forbidden!
(
'Geo node is not the current node.'
)
end
...
...
@@ -99,7 +99,7 @@ module API
not_found
(
'Geo node not found'
)
unless
geo_node
project_registries
=
geo_node
.
project_registries
project_registries
=
paginate
(
geo_node
.
filtered_project_registries
(
params
[
:type
]))
present
project_registries
,
with:
::
ProjectRegistryEntity
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