This commit is contained in:
Peter Maquiran
2022-09-29 14:44:21 +01:00
parent 530305a3dc
commit 68d8753abd
4 changed files with 64 additions and 21 deletions
+13 -13
View File
@@ -366,20 +366,20 @@ export class ChatService {
let options = {
headers: this.headers
};
return await this.http.get(environment.apiURL + 'UserAuthentication/RegenereChatToken', options).subscribe(async res => {
let data = {
status: res['status'],
data: {
userId: res['data'].userId,
authToken: res['data'].authToken
}
let res = await this.http.get(environment.apiURL + 'UserAuthentication/RegenereChatToken', options).toPromise();
let data = {
status: res['status'],
data: {
userId: res['data'].userId,
authToken: res['data'].authToken
}
SessionStore.user.ChatData = data
SessionStore.save()
this.setheader()
// console.log(res)
// console.log(SessionStore.user.ChatData)
});
}
SessionStore.user.ChatData = data
SessionStore.save()
this.setheader()
} else {
this.setheader()
}