Skip to content
Snippets Groups Projects
Commit ed464eda authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Message for api files and groups.

parent d4b613de
No related branches found
No related tags found
No related merge requests found
Loading
@@ -108,7 +108,7 @@ module API
Loading
@@ -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
Loading
Loading
Loading
@@ -35,7 +35,7 @@ module API
Loading
@@ -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)
   
Loading
@@ -53,7 +53,7 @@ module API
Loading
@@ -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
   
Loading
Loading
Loading
@@ -54,7 +54,7 @@ module API
Loading
@@ -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
   
Loading
@@ -97,7 +97,7 @@ module API
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment