mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DatabaseService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user