comment all capacitor code

This commit is contained in:
tiago.kayaya
2021-02-23 16:10:14 +01:00
parent 8265455b95
commit d885549bb9
5 changed files with 26 additions and 119 deletions
+9 -9
View File
@@ -52,7 +52,7 @@ export class AuthService {
if (result)
{
this.ValidatedUser = user;
this.storageService.store(AuthConnstants.USER, response);
//this.storageService.store(AuthConnstants.USER, response);
}
return result;
}
@@ -70,29 +70,29 @@ export class AuthService {
//Get user data from RocketChat | global object
getUserData(){
this.storageService.get(AuthConnstants.AUTH).then(res=>{
/* this.storageService.get(AuthConnstants.AUTH).then(res=>{
this.userData$.next(res);
});
}); */
}
//Get user Id | global object
getUserId(){
this.storageService.get(AuthConnstants.USER).then(res=>{
/* this.storageService.get(AuthConnstants.USER).then(res=>{
this.userId$.next(res);
});
}); */
}
getProfile(){
this.storageService.get(AuthConnstants.PROFILE).then(res=>{
/* this.storageService.get(AuthConnstants.PROFILE).then(res=>{
return res;
});
}); */
}
logoutChat(){
//this.storageService.clear();
this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
/* this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
this.userData$.next('');
this.router.navigate(['']);
})
}) */
}
}
+4 -4
View File
@@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { Plugins } from '@capacitor/core';
const { Storage } = Plugins;
/* import { Plugins } from '@capacitor/core';
const { Storage } = Plugins; */
@Injectable({
providedIn: 'root'
})
export class StorageService {
constructor() {}
// Store the value
/* // Store the value
async store(storageKey: string, value: any) {
const encryptedValue = btoa(escape(JSON.stringify(value)));
await Storage.set({
@@ -29,5 +29,5 @@ const { Storage } = Plugins;
// Clear storage
async clear() {
await Storage.clear();
}
} */
}