Added Client-id in hub connection
This commit is contained in:
@@ -12,6 +12,7 @@ import { ModalHelper } from "../modules/base-components";
|
||||
import { AuthToken } from "src/_base/baseRestService";
|
||||
|
||||
declare let $: any;
|
||||
declare let cmsClient: any;
|
||||
|
||||
function recalcArrayId(prefix: string, alarms: Array<signalr_alarms.genericAlarm>, processid: number = 0) {
|
||||
for (const key in alarms) {
|
||||
@@ -60,7 +61,10 @@ export class Hub {
|
||||
let authData = JSON.parse(window.sessionStorage.getItem("authorizationData") || window.localStorage.getItem("authorizationData")) as AuthToken;
|
||||
|
||||
if (authData)
|
||||
$.connection.hub.qs = { "Authorization": authData.access_token };
|
||||
$.connection.hub.qs = { "Authorization": authData.access_token};
|
||||
|
||||
if (typeof cmsClient != "undefined")
|
||||
$.connection.hub.qs.CmsClientId = cmsClient.getClientID;
|
||||
|
||||
$.connection.hub.start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user