Skip to content

Commit

Permalink
initJQueryCSRF -> initJQueryAjaxCSRF
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 4, 2017
1 parent 86ca60f commit f0cc46b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions superset/assets/javascripts/SqlLab/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';
import { render } from 'react-dom';
import { getInitialState, sqlLabReducer } from './reducers';
import { initEnhancer } from '../reduxUtils';
import { initJQueryCSRF } from '../modules/utils';
import { initJQueryAjaxCSRF } from '../modules/utils';
import { createStore, compose, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
Expand All @@ -15,7 +15,7 @@ import App from './components/App';


require('./main.css');
initJQueryCSRF();
initJQueryAjaxCSRF();

const appContainer = document.getElementById('app');
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/javascripts/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function customizeToolTip(chart, xAxisFormatter, yAxisFormatters) {
});
}

export function initJQueryCSRF() {
export function initJQueryAjaxCSRF() {
// Works in conjunction with a Flask-WTF token as described here:
// http://flask-wtf.readthedocs.io/en/stable/csrf.html#javascript-requests
const token = $('input#csrf_token').val();
Expand Down

0 comments on commit f0cc46b

Please sign in to comment.