[Fix #395] Export user email in API
This commit is contained in:
parent
931e547afa
commit
dd581082ca
2 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,7 @@ class DossierSerializer < ActiveModel::Serializer
|
|||
:created_at,
|
||||
:updated_at,
|
||||
:archived,
|
||||
:email,
|
||||
:mandataire_social,
|
||||
:state,
|
||||
:simplified_state,
|
||||
|
@ -22,6 +23,10 @@ class DossierSerializer < ActiveModel::Serializer
|
|||
has_many :pieces_justificatives
|
||||
has_many :types_de_piece_justificative
|
||||
|
||||
def email
|
||||
object.user.try(:email)
|
||||
end
|
||||
|
||||
def simplified_state
|
||||
object.decorate.display_state
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue