FIX: error in csrf initializer on subfolder installs
This commit is contained in:
parent
678a42121e
commit
6cc5e4856b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,11 +1,11 @@
|
|||
/* global $:true */
|
||||
/* global $:true, Discourse */
|
||||
import request from 'ember-ajax/request';
|
||||
|
||||
export default {
|
||||
name: "findCsrfToken",
|
||||
|
||||
initialize() {
|
||||
return request('/session/csrf').then(function(result) {
|
||||
return request(Discourse.getURL('/session/csrf')).then(function(result) {
|
||||
var token = result.csrf;
|
||||
$.ajaxPrefilter(function(options, originalOptions, xhr) {
|
||||
if (!options.crossDomain) {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ var Repo = Ember.Object.extend({
|
|||
var self = this;
|
||||
this.set('upgrading', true);
|
||||
|
||||
return this.repoAjax(Discourse.getURL('/admin/docker/upgrade'), { dataType: 'text', type: 'POST' }).catch(function(e) {
|
||||
return this.repoAjax(Discourse.getURL('/admin/docker/upgrade'), { dataType: 'text', type: 'POST' }).catch(function() {
|
||||
self.set('upgrading', false);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue