mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +02:00
update: common/Session.js
- Use body instead of data - Use template literal instead of concatenation
This commit is contained in:
committed by
Franz Liedke
parent
f7931e8a30
commit
44975bc606
@@ -30,13 +30,13 @@ export default class Session {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
login(data, options = {}) {
|
login(body, options = {}) {
|
||||||
return app.request(
|
return app.request(
|
||||||
Object.assign(
|
Object.assign(
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: app.forum.attribute('baseUrl') + '/login',
|
url: `${app.forum.attribute('baseUrl')}/login`,
|
||||||
data,
|
body,
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
@@ -49,6 +49,6 @@ export default class Session {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
logout() {
|
logout() {
|
||||||
window.location = app.forum.attribute('baseUrl') + '/logout?token=' + this.csrfToken;
|
window.location = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user