Fix woka list url

This commit is contained in:
Alexis Faizeau 2022-03-04 10:50:44 +01:00
parent 4091606f75
commit 9300b05335
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ export class CustomizeScene extends AbstractCharacterScene {
preload() {
const wokaMetadataKey = "woka-list";
this.cache.json.remove(wokaMetadataKey);
this.load.json(wokaMetadataKey, `${PUSHER_URL}/${wokaMetadataKey}`);
this.load.json(wokaMetadataKey, `${PUSHER_URL}/woka/list`);
this.load.once(`filecomplete-json-${wokaMetadataKey}`, () => {
this.playerTextures.loadPlayerTexturesMetadata(this.cache.json.get(wokaMetadataKey));
this.loadCustomSceneSelectCharacters()

View File

@ -43,13 +43,13 @@ export class SelectCharacterScene extends AbstractCharacterScene {
}
preload() {
const wokaMetadataKey = "woka/list";
const wokaMetadataKey = "woka-list";
this.cache.json.remove(wokaMetadataKey);
// FIXME: window.location.href is wrong. We need the URL of the main room (so we need to apply any redirect before!)
this.load.json(
wokaMetadataKey,
`${PUSHER_URL}/${wokaMetadataKey}/` + encodeURIComponent(window.location.href),
`${PUSHER_URL}/woka/list/` + encodeURIComponent(window.location.href),
undefined,
{
responseType: "text",