Changes ANONYMOUS dynamic variable
This commit is contained in:
commit
213af0cfa3
5 changed files with 6 additions and 2 deletions
|
@ -5,7 +5,7 @@ import { adminApi } from "../Services/AdminApi";
|
|||
import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager";
|
||||
import { parse } from "query-string";
|
||||
import { openIDClient } from "../Services/OpenIDClient";
|
||||
import { DISABLE_ANONYMOUS } from "_Enum/EnvironmentVariable";
|
||||
import { DISABLE_ANONYMOUS } from "../Enum/EnvironmentVariable";
|
||||
|
||||
export interface TokenInterface {
|
||||
userUuid: string;
|
||||
|
|
|
@ -175,12 +175,13 @@ export class IoSocketController {
|
|||
|
||||
const tokenData =
|
||||
token && typeof token === "string" ? jwtTokenManager.verifyJWTToken(token) : null;
|
||||
const userIdentifier = tokenData ? tokenData.identifier : "";
|
||||
|
||||
if (DISABLE_ANONYMOUS && !tokenData) {
|
||||
throw new Error("Expecting token");
|
||||
}
|
||||
|
||||
const userIdentifier = tokenData ? tokenData.identifier : "";
|
||||
|
||||
let memberTags: string[] = [];
|
||||
let memberVisitCardUrl: string | null = null;
|
||||
let memberMessages: unknown;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue