Skip to content

Commit

Permalink
FIX: Sorting broke after devise removal due to missing csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmcal committed Nov 18, 2024
1 parent b0bafb2 commit 122a7c5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/javascript/admin/components/sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const sort = (selector) => {
}
const model = element.dataset.model
const url = element.dataset.url
const csrf = document.querySelector('[name~=csrf-token]').content
const sortable = Sortable.create(element, {
onSort: () => {
const data = {
Expand All @@ -20,7 +19,6 @@ const sort = (selector) => {
fetch(url, {
method: 'PUT',
headers: {
'X-CSRF-Token': csrf,
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
Expand Down

0 comments on commit 122a7c5

Please sign in to comment.