summaryrefslogtreecommitdiff
path: root/app/serializers/commit_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/commit_entity.rb')
-rw-r--r--app/serializers/commit_entity.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/commit_entity.rb b/app/serializers/commit_entity.rb
index f7eba6fc1e3..acc20f6dc52 100644
--- a/app/serializers/commit_entity.rb
+++ b/app/serializers/commit_entity.rb
@@ -9,4 +9,11 @@ class CommitEntity < API::Entities::RepoCommit
request.project,
id: commit.id)
end
+
+ expose :commit_path do |commit|
+ namespace_project_tree_path(
+ request.project.namespace,
+ request.project,
+ id: commit.id)
+ end
end