Skip to content

Commit

Permalink
Use POST instead of PUT because http_method_override not enabled ever…
Browse files Browse the repository at this point in the history
…ywhere
  • Loading branch information
yann-eugone committed Oct 10, 2023
1 parent 65a9780 commit dec49cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Admin/SavedFiltersAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,27 @@ protected function configureRoutes(RouteCollectionInterface $collection): void
$collection->add(
name: 'protect',
pattern: "{$this->getRouterIdParameter()}/protect",
methods: [Request::METHOD_PUT],
methods: [Request::METHOD_POST],
);
$collection->add(
name: 'unprotect',
pattern: "{$this->getRouterIdParameter()}/unprotect",
methods: [Request::METHOD_PUT],
methods: [Request::METHOD_POST],
);
$collection->add(
name: 'share',
pattern: "{$this->getRouterIdParameter()}/share",
methods: [Request::METHOD_PUT],
methods: [Request::METHOD_POST],
);
$collection->add(
name: 'subscribe',
pattern: "{$this->getRouterIdParameter()}/subscribe",
methods: [Request::METHOD_PUT],
methods: [Request::METHOD_POST],
);
$collection->add(
name: 'unsubscribe',
pattern: "{$this->getRouterIdParameter()}/unsubscribe",
methods: [Request::METHOD_PUT],
methods: [Request::METHOD_POST],
);
}

Expand Down
1 change: 0 additions & 1 deletion templates/saved_filters/list_form_action.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<form action="{{ url }}" method="post">
<input type="hidden" name="_method" value="PUT">
<button class="btn btn-xs btn-default" title="{{ title }}">
<i class="{{ icon }}"></i>
</button>
Expand Down

0 comments on commit dec49cf

Please sign in to comment.