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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ed464eda
Commit
ed464eda
authored
Dec 30, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message for api files and groups.
parent
d4b613de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
lib/api/commits.rb
lib/api/commits.rb
+1
-1
lib/api/files.rb
lib/api/files.rb
+2
-2
lib/api/groups.rb
lib/api/groups.rb
+2
-2
No files found.
lib/api/commits.rb
View file @
ed464eda
...
@@ -108,7 +108,7 @@ module API
...
@@ -108,7 +108,7 @@ module API
if
note
.
save
if
note
.
save
present
note
,
with:
Entities
::
CommitNote
present
note
,
with:
Entities
::
CommitNote
else
else
error!
(
"Failed to save note
"
,
422
)
render_api_error!
(
"Failed to save note
#{
note
.
errors
.
messages
}
"
,
422
)
end
end
end
end
end
end
...
...
lib/api/files.rb
View file @
ed464eda
...
@@ -35,7 +35,7 @@ module API
...
@@ -35,7 +35,7 @@ module API
file_path
=
attrs
.
delete
(
:file_path
)
file_path
=
attrs
.
delete
(
:file_path
)
commit
=
user_project
.
repository
.
commit
(
ref
)
commit
=
user_project
.
repository
.
commit
(
ref
)
not_found!
"Commit"
unless
commit
not_found!
'Commit'
unless
commit
blob
=
user_project
.
repository
.
blob_at
(
commit
.
sha
,
file_path
)
blob
=
user_project
.
repository
.
blob_at
(
commit
.
sha
,
file_path
)
...
@@ -53,7 +53,7 @@ module API
...
@@ -53,7 +53,7 @@ module API
commit_id:
commit
.
id
,
commit_id:
commit
.
id
,
}
}
else
else
render_api_error!
(
'File not found'
,
404
)
not_found!
'File'
end
end
end
end
...
...
lib/api/groups.rb
View file @
ed464eda
...
@@ -54,7 +54,7 @@ module API
...
@@ -54,7 +54,7 @@ module API
if
@group
.
save
if
@group
.
save
present
@group
,
with:
Entities
::
Group
present
@group
,
with:
Entities
::
Group
else
else
not_found!
render_api_error!
(
"Failed to save group
#{
@group
.
errors
.
messages
}
"
,
422
)
end
end
end
end
...
@@ -97,7 +97,7 @@ module API
...
@@ -97,7 +97,7 @@ module API
if
result
if
result
present
group
present
group
else
else
not_found!
render_api_error!
(
"Failed to transfer project
#{
project
.
errors
.
messages
}
"
,
422
)
end
end
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