This commit is contained in:
tiago.kayaya
2021-02-26 08:38:33 +01:00
parent a74a8bfa9d
commit 8a93e49f71
9 changed files with 63 additions and 16 deletions
+3 -6
View File
@@ -52,12 +52,9 @@ export class AuthService {
result = await this.http.get<boolean>(service, options).toPromise();
response = await this.http.post<any>(environment.apiURL + "UserAuthentication/Login", '', this.opts).toPromise();
/* this.http.post(environment.apiURL + "UserAuthentication/Login", '', this.opts).subscribe(res=>{
this.storageService.store(AuthConnstants.USER, res);
this.ValidatedUser = user;
response = user;
console.log(user);
}); */
console.log(response);
if (result)
{
+1
View File
@@ -87,6 +87,7 @@ export class ChatService {
//Load messages from roomId
getAllDirectMessages(){
console.log(this.options);
return this.http.get(environment.apiChatUrl+'im.list', this.options);
}
//Load messages from roomId
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { DatabaseService } from './database.service';
describe('DatabaseService', () => {
let service: DatabaseService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DatabaseService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+9
View File
@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class DatabaseService {
constructor() { }
}
+2 -4
View File
@@ -15,11 +15,9 @@ const { Storage } = Plugins; */
}
// Get the value
async get(key: string) {
const ret = await this.storage.get(key).then((val) => {
return val;
});
const ret = await this.storage.get(key).then((val) => { return val; });
return JSON.parse(unescape(atob(ret)));
}
}
/*
// Get the value
async get(storageKey: string) {