summaryrefslogtreecommitdiff
path: root/lib/gitlab/url_builder.rb
diff options
context:
space:
mode:
authorGuyzmo <guyzmo+gitlab+pub@m0g.net>2016-11-26 16:37:26 +0100
committerGuyzmo <guyzmo+gitlab+pub@m0g.net>2016-12-01 19:07:49 +0100
commitfde754e2676e40dcf2600190983ef54030c5d5a5 (patch)
treed8d68db59c5625369242c394eb6fa788185a0f17 /lib/gitlab/url_builder.rb
parentcf1a31a3459786f637971e2dafe4df31f5a28e74 (diff)
downloadgitlab-ce-fde754e2676e40dcf2600190983ef54030c5d5a5.tar.gz
API: Endpoint to expose personal snippets as /snippets
Adding the necessary API for the new /snippets Restful resource added with this commit. Added a new Grape class `Snippets`, as well as a `PersonalSnippet` entity. Issue: #20042 Merge-Request: !6373 Signed-off-by: Guyzmo <guyzmo+gitlab+pub@m0g.net>
Diffstat (limited to 'lib/gitlab/url_builder.rb')
-rw-r--r--lib/gitlab/url_builder.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb
index 99d0c28e749..ccb456bcc94 100644
--- a/lib/gitlab/url_builder.rb
+++ b/lib/gitlab/url_builder.rb
@@ -24,6 +24,8 @@ module Gitlab
wiki_page_url
when ProjectSnippet
project_snippet_url(object)
+ when Snippet
+ personal_snippet_url(object)
else
raise NotImplementedError.new("No URL builder defined for #{object.class}")
end