Skip to content

Commit

Permalink
Update consent.js
Browse files Browse the repository at this point in the history
  • Loading branch information
damingo committed Jun 30, 2024
1 parent aa362c0 commit 5c7f50f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,17 @@ export default {
submit() {
const correct = submitQuiz();
if (correct) {
const component = this
const component = this;

const csrfToken = $('meta[name="csrf-token"]').attr('content');

$.ajax({
url: '/u/' + User.currentProp('username') + '.json',
type: 'PUT',
data: "custom_fields[edgeryders_consent]=1",
headers: {
'X-CSRF-Token': csrfToken
},
success: function (data) {
jQuery('#check-button').prop('disabled', true);
component.set("showQuiz", false);
Expand Down

0 comments on commit 5c7f50f

Please sign in to comment.