mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-13 13:31:19 +00:00
18 lines
386 B
Ruby
18 lines
386 B
Ruby
# frozen_string_literal: true
|
|
|
|
module API
|
|
module Entities
|
|
class NamespaceBasic < Grape::Entity
|
|
expose :id, :name, :path, :kind, :full_path, :parent_id, :avatar_url
|
|
|
|
expose :web_url do |namespace|
|
|
if namespace.user?
|
|
Gitlab::Routing.url_helpers.user_url(namespace.owner)
|
|
else
|
|
namespace.web_url
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|