mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'feature/websocket' of https://bitbucket.org/equilibriumito/gabinete-digital into feature/websocket
This commit is contained in:
@@ -20,7 +20,7 @@ export class AuthService {
|
||||
headers: HttpHeaders;
|
||||
public ValidatedUser: UserSession;
|
||||
public wsValidatedUserChat:any;
|
||||
public ValidatedUserChat:any;
|
||||
public ValidatedUserChat:any = {}
|
||||
public isWsAuthenticated: boolean = false;
|
||||
opts:any;
|
||||
|
||||
|
||||
@@ -17,7 +17,10 @@ export class WsChatService {
|
||||
constructor() {}
|
||||
|
||||
connect() {
|
||||
if(this.ws.connected == true) { return false }
|
||||
// dont connect if is already connected
|
||||
if(this.ws.connected == true) {
|
||||
return false
|
||||
}
|
||||
|
||||
this.ws.connect();
|
||||
|
||||
@@ -43,8 +46,12 @@ export class WsChatService {
|
||||
}
|
||||
|
||||
login() {
|
||||
|
||||
if(this.isLogin == true) { return new Promise((resolve, reject)=>{ resolve(this.loginResponse) }) }
|
||||
// dont login if is already login
|
||||
if(this.isLogin == true) {
|
||||
return new Promise((resolve, reject)=>{
|
||||
resolve(this.loginResponse)
|
||||
})
|
||||
}
|
||||
|
||||
const requestId = uuidv4()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user