Skip to content

Commit

Permalink
Adjust card position value in sortable controller
Browse files Browse the repository at this point in the history
  • Loading branch information
piowit committed Jul 17, 2024
1 parent 5ae06e1 commit b774190
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/javascript/controllers/sortable_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@ export default class extends Controller {
const url = this.urlValue.replace(":id", id);

const card = {
position: newIndex,
position: newIndex + 1,
board_column_id: newColumnId,
};

const body = {
_method: 'patch',
authenticity_token: document.querySelector("[name='csrf-token']").content,
card: card,
commit: 'Save'
};

put(url, {
Expand Down

0 comments on commit b774190

Please sign in to comment.