mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
bugfix (closes #92)
This commit is contained in:
@@ -879,11 +879,10 @@ import logWatcherService from './service/logwatcher.js'
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
API.login = function (params) {
|
API.login = function (params) {
|
||||||
var auth = `${params.username}:${params.password}`;
|
var { username, password } = params;
|
||||||
auth = encodeURIComponent(auth);
|
username = encodeURIComponent(username);
|
||||||
auth = auth.replace(/%([0-9A-F]{2})/g, (_, s) => String.fromCharCode(parseInt(s, 16)));
|
password = encodeURIComponent(password);
|
||||||
auth = auth.replace('%', '%25');
|
var auth = btoa(`${username}:${password}`);
|
||||||
auth = btoa(auth);
|
|
||||||
return this.call(`auth/user?apiKey=${this.cachedConfig.clientApiKey}`, {
|
return this.call(`auth/user?apiKey=${this.cachedConfig.clientApiKey}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user