-
Notifications
You must be signed in to change notification settings - Fork 41
Refactor JS #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Refactor JS #241
Changes from 1 commit
ac998c2
1532925
cb11999
521b0c2
7bddc67
871ab25
cbf503e
a990e01
bd72e31
6115812
e19ef24
9b46e85
6fe61ca
6002921
e93e3e8
95b5664
331859e
c42c9fc
7a35c2c
81ad153
c2753ed
1c92613
5307cb1
449c9cb
e8b7ea3
9e58703
672bcb1
b9edbe2
23a316e
55e10a6
e35488d
3accfb1
18b76a5
72e5f40
82a766f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ import "messenger" | |
| import Rails from "@rails/ujs"; | ||
|
|
||
| Rails.start(); | ||
| import "@rails/request.js" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,9 +10,6 @@ export default class extends Controller { | |
| const optionsResponse = await fetch(this.optionsUrlValue, { | ||
| method: "POST", | ||
| body: new FormData(this.element), | ||
| headers: { | ||
| "X-CSRF-Token": document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") | ||
| } | ||
| }); | ||
|
|
||
| const optionsJson = await optionsResponse.json(); | ||
|
|
@@ -37,9 +34,6 @@ export default class extends Controller { | |
| const optionsResponse = await fetch(this.optionsUrlValue, { | ||
|
||
| method: "POST", | ||
| body: new FormData(this.element), | ||
| headers: { | ||
| "X-CSRF-Token": document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") | ||
| } | ||
| }); | ||
|
|
||
| const optionsJson = await optionsResponse.json(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we move this up along with the rest of the
imports?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5307cb1