Add edit_key to Parties output on create
We create a new view `created` that includes the `full` view but adds the `edit_key` param
This commit is contained in:
parent
c4ae38a432
commit
bedd72a753
2 changed files with 6 additions and 1 deletions
|
|
@ -86,6 +86,11 @@ module Api
|
|||
include_view :preview
|
||||
end
|
||||
|
||||
view :created do
|
||||
include_view :full
|
||||
fields :edit_key
|
||||
end
|
||||
|
||||
view :destroyed do
|
||||
fields :name, :description, :created_at, :updated_at
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module Api
|
|||
# end
|
||||
|
||||
if party.save!
|
||||
return render json: PartyBlueprint.render(party, view: :full, root: :party),
|
||||
return render json: PartyBlueprint.render(party, view: :created, root: :party),
|
||||
status: :created
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue