add updated at to project package show api

dev_aliyun
p31729568 5 years ago
parent b9d5122e62
commit 6e687f518a

@ -20,6 +20,9 @@ module Mobile
expose :contact_name, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? } expose :contact_name, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? }
expose :contact_phone, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? } expose :contact_phone, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? }
expose :updated_at do |package, _|
package.updated_at.try(:utc).try(:iso8601)
end
expose :deadline_at do |package, _| expose :deadline_at do |package, _|
package.deadline_at.try(:utc).try(:iso8601) package.deadline_at.try(:utc).try(:iso8601)
end end

Loading…
Cancel
Save