diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-10-05 11:48:05 +0300 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-10-05 11:48:05 +0300 |
commit | c55a9ac4ae56ed29d192ea71bca9fb31f88f5dc1 (patch) | |
tree | 9decf8385cf013bfc6bbae6b0d1c97ae71bb36f7 /lib/api/tags.rb | |
parent | 8921af39e74976e37e92c786bd957883110f6522 (diff) |
Remove 'Repo' prefix from API entites
Diffstat (limited to 'lib/api/tags.rb')
-rw-r--r-- | lib/api/tags.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/tags.rb b/lib/api/tags.rb index 912415e3a7f..0d394a7b441 100644 --- a/lib/api/tags.rb +++ b/lib/api/tags.rb @@ -11,18 +11,18 @@ module API end resource :projects, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do desc 'Get a project repository tags' do - success Entities::RepoTag + success Entities::Tag end params do use :pagination end get ':id/repository/tags' do tags = ::Kaminari.paginate_array(user_project.repository.tags.sort_by(&:name).reverse) - present paginate(tags), with: Entities::RepoTag, project: user_project + present paginate(tags), with: Entities::Tag, project: user_project end desc 'Get a single repository tag' do - success Entities::RepoTag + success Entities::Tag end params do requires :tag_name, type: String, desc: 'The name of the tag' @@ -31,11 +31,11 @@ module API tag = user_project.repository.find_tag(params[:tag_name]) not_found!('Tag') unless tag - present tag, with: Entities::RepoTag, project: user_project + present tag, with: Entities::Tag, project: user_project end desc 'Create a new repository tag' do - success Entities::RepoTag + success Entities::Tag end params do requires :tag_name, type: String, desc: 'The name of the tag' @@ -51,7 +51,7 @@ module API if result[:status] == :success present result[:tag], - with: Entities::RepoTag, + with: Entities::Tag, project: user_project else render_api_error!(result[:message], 400) |