mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
Use new config keys
This commit is contained in:
@@ -38,7 +38,7 @@ export default class Model {
|
||||
|
||||
return m.request({
|
||||
method: this.exists ? 'PUT' : 'POST',
|
||||
url: app.config.apiURL+'/'+this.data().type+(this.exists ? '/'+this.data().id : ''),
|
||||
url: app.config['api_url']+'/'+this.data().type+(this.exists ? '/'+this.data().id : ''),
|
||||
data: {data},
|
||||
background: true,
|
||||
config: app.session.authorize.bind(app.session)
|
||||
@@ -53,7 +53,7 @@ export default class Model {
|
||||
|
||||
return m.request({
|
||||
method: 'DELETE',
|
||||
url: app.config.apiURL+'/'+this.data().type+'/'+this.data().id,
|
||||
url: app.config['api_url']+'/'+this.data().type+'/'+this.data().id,
|
||||
background: true,
|
||||
config: app.session.authorize.bind(app.session)
|
||||
}).then(() => this.exists = false);
|
||||
|
@@ -13,7 +13,7 @@ export default class Session extends mixin(class {}, evented) {
|
||||
var self = this;
|
||||
m.request({
|
||||
method: 'POST',
|
||||
url: app.config.baseURL+'/login',
|
||||
url: app.config['base_url']+'/login',
|
||||
data: {identification, password},
|
||||
background: true
|
||||
}).then(function(response) {
|
||||
|
@@ -39,7 +39,7 @@ export default class Store {
|
||||
}
|
||||
return m.request({
|
||||
method: 'GET',
|
||||
url: app.config.apiURL+'/'+endpoint,
|
||||
url: app.config['api_url']+'/'+endpoint,
|
||||
data: params,
|
||||
background: true,
|
||||
config: app.session.authorize.bind(app.session)
|
||||
|
Reference in New Issue
Block a user