clean: respect es11
This commit is contained in:
@ -3,11 +3,11 @@ import { MatchMaking } from "./matchmaking.js";
|
||||
import { Profiles } from "./profiles.js";
|
||||
import { Channels } from './chat/channels.js';
|
||||
import { MyProfile } from "./MyProfile.js";
|
||||
import { navigateTo } from "../index.js"
|
||||
import { navigateTo } from "../index.js";
|
||||
import { Tourmanents } from "./tournament/tournaments.js";
|
||||
import {Notice} from "./chat/notice.js"
|
||||
import {Notice} from "./chat/notice.js";
|
||||
import { Channel } from "./chat/channel.js";
|
||||
import LanguageManager from './LanguageManager.js'
|
||||
import LanguageManager from './LanguageManager.js';
|
||||
|
||||
function getCookie(name)
|
||||
{
|
||||
@ -15,7 +15,7 @@ function getCookie(name)
|
||||
document.cookie.split(';').forEach(function(el) {
|
||||
let split = el.split('=');
|
||||
cookie[split[0].trim()] = split.slice(1).join("=");
|
||||
})
|
||||
});
|
||||
return cookie[name];
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class Client
|
||||
*/
|
||||
this.notice = new Notice(this);
|
||||
|
||||
this.lang = new LanguageManager;
|
||||
this.lang = new LanguageManager();
|
||||
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ class Client
|
||||
*/
|
||||
async login(username, password)
|
||||
{
|
||||
let response = await this._post("/api/accounts/login", {username: username, password: password})
|
||||
let response = await this._post("/api/accounts/login", {username: username, password: password});
|
||||
if (response.status == 200)
|
||||
await this._update_logged(true);
|
||||
|
||||
@ -244,8 +244,8 @@ class Client
|
||||
let response = await this._get("/api/accounts/logged");
|
||||
|
||||
await this._update_logged(response.status === 200);
|
||||
return response.status === 200
|
||||
return response.status === 200;
|
||||
}
|
||||
}
|
||||
|
||||
export {Client}
|
||||
export {Client};
|
||||
|
||||
Reference in New Issue
Block a user