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
fcc86c15
Commit
fcc86c15
authored
Feb 24, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add intial code for create mirror api
parent
1c6e59fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
lib/api/remote_mirrors.rb
lib/api/remote_mirrors.rb
+18
-0
No files found.
lib/api/remote_mirrors.rb
View file @
fcc86c15
...
...
@@ -26,6 +26,24 @@ module API
with:
Entities
::
RemoteMirror
end
desc
'Create remote mirror for a project'
do
success
Entities
::
RemoteMirror
end
params
do
requries
:url
,
type:
String
,
desc:
'The URL for a remote mirror'
end
post
':id/remote_mirrors'
do
create_params
=
declared_params
(
include_missing:
false
)
new_mirror
=
user_project
.
remote_mirrors
.
create
(
create_params
)
if
new_mirror
.
persisted?
present
new_mirror
,
with:
Entities
::
RemoteMirror
else
render_validation_error!
(
new_mirror
)
end
end
desc
'Update the attributes of a single remote mirror'
do
success
Entities
::
RemoteMirror
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