Skip to content

Commit

Permalink
feature: 涉及版本详情的结构体新增 text_changelog 返回字符串类型的变更日志
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Nov 24, 2021
1 parent c7bb778 commit 650f1ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/serializers/api/upload_app_serializer.rb
Expand Up @@ -4,10 +4,14 @@ class Api::UploadAppSerializer < ApplicationSerializer
# release model based
attributes :id, :version, :app_name, :bundle_id, :release_version, :build_version,
:source, :branch, :git_commit, :ci_url, :size,
:icon_url, :release_url, :install_url, :qrcode_url, :array_changelog,
:icon_url, :release_url, :install_url, :qrcode_url, :changelog, :text_changelog,
:custom_fields, :created_at

belongs_to :app
belongs_to :scheme
belongs_to :channel

def changelog
object.array_changelog(false)
end
end
6 changes: 5 additions & 1 deletion app/serializers/release_serializer.rb
Expand Up @@ -3,10 +3,14 @@
class ReleaseSerializer < ApplicationSerializer
attributes :version, :app_name, :bundle_id, :release_version, :build_version,
:source, :branch, :git_commit, :ci_url, :size,
:icon_url, :install_url, :changelog,
:icon_url, :install_url, :changelog, :text_changelog
:created_at

def changelog
object.array_changelog(false)
end

def text_changelog
object.text_changelog(false)
end
end

0 comments on commit 650f1ff

Please sign in to comment.