mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -18,9 +18,6 @@ export class ChatService {
|
||||
options1:any;
|
||||
X_User_Id:any;
|
||||
X_Auth_Token:any;
|
||||
|
||||
//SERVER_URL = 'wss://www.tabularium.pt/websocket';
|
||||
//public messages: Subject<any>;
|
||||
loggedUserChat:any;
|
||||
bindOnMessage: any;
|
||||
|
||||
@@ -32,20 +29,20 @@ export class ChatService {
|
||||
private storageService:StorageService,
|
||||
public p: PermissionService) {
|
||||
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access)){
|
||||
this.loggedUserChat = authService.ValidatedUserChat;
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access)) {
|
||||
//
|
||||
this.headers = this.headers.set('X-User-Id', this.loggedUserChat.userId);
|
||||
this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat.authToken);
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
}
|
||||
this.loggedUserChat = authService.ValidatedUserChat;
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
console.log('!!!::!!! chat service',this.loggedUserChat)
|
||||
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access)) {
|
||||
//
|
||||
this.headers = this.headers.set('X-User-Id', this.loggedUserChat.data.userId);
|
||||
this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat.data.authToken);
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -65,9 +62,9 @@ export class ChatService {
|
||||
headers: headersc,
|
||||
withCredentials: true
|
||||
};
|
||||
//let fullUrl = "https://www.tabularium.pt/" + url;
|
||||
// let fullUrl = "https://www.tabularium.pt/" + url;
|
||||
return this.http.get(url, optionsc).subscribe(()=>{
|
||||
//this.fileService.viewDocumentByUrl(url)
|
||||
// this.fileService.viewDocumentByUrl(url)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user