do not cache action links

Those are user specific and thus need to be evaluated on a per user basis
pull/7623/head
ulferts 5 years ago
parent d5ee1a7d20
commit 7667fa859c
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 15
      modules/grids/app/representers/api/v3/grids/grid_representer.rb

@ -54,27 +54,24 @@ module API
self_link title_getter: ->(*) { nil }
link :updateImmediately do
next unless write_allowed?
link :updateImmediately,
cache_if: -> { write_allowed? } do
{
href: api_v3_paths.grid(represented.id),
method: :patch
}
end
link :update do
next unless write_allowed?
link :update,
cache_if: -> { write_allowed? } do
{
href: api_v3_paths.grid_form(represented.id),
method: :post
}
end
link :delete do
next unless delete_allowed?
link :delete,
cache_if: -> { delete_allowed? } do
{
href: api_v3_paths.grid(represented.id),
method: :delete

Loading…
Cancel
Save