Reimporting correctly types moved to /messages
This commit is contained in:
parent
4385d5aff9
commit
fa2e583d48
4 changed files with 10 additions and 9 deletions
|
@ -197,7 +197,9 @@ class ConnectionManager {
|
||||||
// try to connect with function loadOpenIDScreen
|
// try to connect with function loadOpenIDScreen
|
||||||
if (
|
if (
|
||||||
this._currentRoom.authenticationMandatory ||
|
this._currentRoom.authenticationMandatory ||
|
||||||
(axios.isAxiosError(err) && err.response?.data && err.response.data !== "User cannot to be connected on openid provider")
|
(axios.isAxiosError(err) &&
|
||||||
|
err.response?.data &&
|
||||||
|
err.response.data !== "User cannot to be connected on openid provider")
|
||||||
) {
|
) {
|
||||||
this.loadOpenIDScreen();
|
this.loadOpenIDScreen();
|
||||||
return Promise.reject(new Error("You will be redirect on login page"));
|
return Promise.reject(new Error("You will be redirect on login page"));
|
||||||
|
|
|
@ -5,8 +5,8 @@ import type { CharacterTexture } from "./LocalUser";
|
||||||
import { localUserStore } from "./LocalUserStore";
|
import { localUserStore } from "./LocalUserStore";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { axiosWithRetry } from "./AxiosUtils";
|
import { axiosWithRetry } from "./AxiosUtils";
|
||||||
import {isMapDetailsData} from "../../../pusher/src/Messages/JsonMessages/MapDetailsData";
|
import { isMapDetailsData } from "../Messages/JsonMessages/MapDetailsData";
|
||||||
import {isRoomRedirect} from "../Messages/JsonMessages/RoomRedirect";
|
import { isRoomRedirect } from "../Messages/JsonMessages/RoomRedirect";
|
||||||
|
|
||||||
export class MapDetail {
|
export class MapDetail {
|
||||||
constructor(public readonly mapUrl: string, public readonly textures: CharacterTexture[] | undefined) {}
|
constructor(public readonly mapUrl: string, public readonly textures: CharacterTexture[] | undefined) {}
|
||||||
|
@ -119,9 +119,8 @@ export class Room {
|
||||||
this._contactPage = data.contactPage || CONTACT_URL;
|
this._contactPage = data.contactPage || CONTACT_URL;
|
||||||
return new MapDetail(data.mapUrl, data.textures);
|
return new MapDetail(data.mapUrl, data.textures);
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Data received by the /map endpoint of the Pusher is not in a valid format.');
|
throw new Error("Data received by the /map endpoint of the Pusher is not in a valid format.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (axios.isAxiosError(e) && e.response?.status == 401 && e.response?.data === "Token decrypted error") {
|
if (axios.isAxiosError(e) && e.response?.status == 401 && e.response?.data === "Token decrypted error") {
|
||||||
console.warn("JWT token sent could not be decrypted. Maybe it expired?");
|
console.warn("JWT token sent could not be decrypted. Maybe it expired?");
|
||||||
|
|
|
@ -29,7 +29,7 @@ import { emitInBatch } from "../Services/IoSocketHelpers";
|
||||||
import { ADMIN_API_URL, DISABLE_ANONYMOUS, SOCKET_IDLE_TIMER } from "../Enum/EnvironmentVariable";
|
import { ADMIN_API_URL, DISABLE_ANONYMOUS, SOCKET_IDLE_TIMER } from "../Enum/EnvironmentVariable";
|
||||||
import { Zone } from "_Model/Zone";
|
import { Zone } from "_Model/Zone";
|
||||||
import { ExAdminSocketInterface } from "_Model/Websocket/ExAdminSocketInterface";
|
import { ExAdminSocketInterface } from "_Model/Websocket/ExAdminSocketInterface";
|
||||||
import { CharacterTexture } from "../Services/AdminApi/CharacterTexture";
|
import { CharacterTexture} from "../Messages/JsonMessages/CharacterTexture";
|
||||||
import { isAdminMessageInterface } from "../Model/Websocket/Admin/AdminMessages";
|
import { isAdminMessageInterface } from "../Model/Websocket/Admin/AdminMessages";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import { InvalidTokenError } from "../Controller/InvalidTokenError";
|
import { InvalidTokenError } from "../Controller/InvalidTokenError";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { ADMIN_API_TOKEN, ADMIN_API_URL, ADMIN_URL, OPID_PROFILE_SCREEN_PROVIDER } from "../Enum/EnvironmentVariable";
|
import { ADMIN_API_TOKEN, ADMIN_API_URL, ADMIN_URL, OPID_PROFILE_SCREEN_PROVIDER } from "../Enum/EnvironmentVariable";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import { GameRoomPolicyTypes } from "_Model/PusherRoom";
|
import { GameRoomPolicyTypes } from "_Model/PusherRoom";
|
||||||
import { CharacterTexture } from "./AdminApi/CharacterTexture";
|
import { CharacterTexture} from "../Messages/JsonMessages/CharacterTexture";
|
||||||
import { MapDetailsData } from "./AdminApi/MapDetailsData";
|
import { MapDetailsData} from "../Messages/JsonMessages/MapDetailsData";
|
||||||
import { RoomRedirect } from "./AdminApi/RoomRedirect";
|
import { RoomRedirect} from "../Messages/JsonMessages/RoomRedirect";
|
||||||
|
|
||||||
export interface AdminApiData {
|
export interface AdminApiData {
|
||||||
roomUrl: string;
|
roomUrl: string;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue