mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
DEV: Update API documentation for invites (#12360)
This commit is contained in:
@ -5,9 +5,10 @@ class InviteSerializer < ApplicationSerializer
|
||||
:link,
|
||||
:email,
|
||||
:emailed,
|
||||
:redemption_count,
|
||||
:max_redemptions_allowed,
|
||||
:redemption_count,
|
||||
:custom_message,
|
||||
:created_at,
|
||||
:updated_at,
|
||||
:expires_at,
|
||||
:expired
|
||||
@ -27,6 +28,18 @@ class InviteSerializer < ApplicationSerializer
|
||||
object.emailed_status != Invite.emailed_status_types[:not_required]
|
||||
end
|
||||
|
||||
def include_custom_message?
|
||||
email.present?
|
||||
end
|
||||
|
||||
def include_max_redemptions_allowed?
|
||||
email.blank?
|
||||
end
|
||||
|
||||
def include_redemption_count?
|
||||
email.blank?
|
||||
end
|
||||
|
||||
def expired
|
||||
object.expired?
|
||||
end
|
||||
|
Reference in New Issue
Block a user