mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-08 23:30:53 +00:00
More bugfixes. Actually implement the API test experiment.
This commit is contained in:
parent
99f9974dea
commit
1b2ff27530
10 changed files with 57 additions and 13 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import User from './user';
|
||||
|
||||
import {API_SERVER, WEBKIT_CSS as WEBKIT} from 'utilities/constants';
|
||||
import {NEW_API, API_SERVER, WEBKIT_CSS as WEBKIT} from 'utilities/constants';
|
||||
|
||||
import {ManagedStyle} from 'utilities/dom';
|
||||
import {has, SourcedSet} from 'utilities/object';
|
||||
|
@ -175,6 +175,11 @@ export default class Room {
|
|||
if ( this.destroyed )
|
||||
return;
|
||||
|
||||
if ( this.manager.experiments.getAssignment('api_load') )
|
||||
try {
|
||||
fetch(`${NEW_API}/v1/rooms/${this.id ? `id/${this.id}` : this.login}`).catch(() => {});
|
||||
} catch(err) { /* do nothing */ }
|
||||
|
||||
let response, data;
|
||||
try {
|
||||
response = await fetch(`${API_SERVER}/v1/room/${this.id ? `id/${this.id}` : this.login}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue