uncomented login chat

This commit is contained in:
tiago.kayaya
2022-02-24 12:10:09 +01:00
parent c073238c21
commit f8c4f29009
5 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -56,9 +56,9 @@ export class AuthService {
}
/* if (localStorage.getItem("userChat") != null) {
if (localStorage.getItem("userChat") != null) {
this.ValidatedUserChat = JSON.parse(localStorage.getItem('userChat'));
} */
}
}
@@ -112,7 +112,7 @@ export class AuthService {
//user: UserForm
async loginChat() {
/* const expirationMinutes = 30;
const expirationMinutes = 30;
let date = new Date().getTime();
let expirationDate = new Date(new Date().getTime() + expirationMinutes*60*1000);
@@ -135,7 +135,7 @@ export class AuthService {
this.presentAlert('Network error');
}
this.autoLoginChat(expirationDate.getTime() - date); */
this.autoLoginChat(expirationDate.getTime() - date);
}
async autoLoginChat(expirationDate:number){
@@ -145,7 +145,7 @@ export class AuthService {
}
loginToChatWs() {
/* setTimeout(()=>{
setTimeout(()=>{
this.WsChatService.connect();
this.WsChatService.login().then((message) => {
@@ -225,7 +225,7 @@ export class AuthService {
return false
}
};
}, 1) */
}, 1)
}
autologout(expirationDate:number) {
+2 -2
View File
@@ -32,13 +32,13 @@ export class ChatService {
private storageService:StorageService,
)
{
/* this.loggedUserChat = authService.ValidatedUserChat;
this.loggedUserChat = authService.ValidatedUserChat;
this.headers = new HttpHeaders();
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,
}; */
};
}