debian-mirror-gitlab/lib/api/entities/wiki_attachment.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
498 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module API
module Entities
class WikiAttachment < Grape::Entity
include Gitlab::FileMarkdownLinkBuilder
expose :file_name
expose :file_path
expose :branch
expose :link do
expose :file_path, as: :url
expose :markdown do |_entity|
self.markdown_link
end
end
def filename
2022-06-21 17:19:12 +05:30
object[:file_name]
2020-03-13 15:44:24 +05:30
end
def secure_url
2022-06-21 17:19:12 +05:30
object[:file_path]
2020-03-13 15:44:24 +05:30
end
end
end
end