- profile storage fixes
This commit is contained in:
@@ -9,12 +9,12 @@ export class ProfileService {
|
|||||||
fallback: string = 'assets/data/profiles.json';
|
fallback: string = 'assets/data/profiles.json';
|
||||||
epSubmitted: string = '/submitted';
|
epSubmitted: string = '/submitted';
|
||||||
epVerified: string = '/verified';
|
epVerified: string = '/verified';
|
||||||
idMap: any = { all: {}, submitted: {}, verified: {} };
|
idMap: any;
|
||||||
profiles: any;
|
profiles: any;
|
||||||
|
|
||||||
|
|
||||||
constructor(private http: Http) {
|
constructor(private http: Http) {
|
||||||
this.idMap = {};
|
this.idMap = { all: {}, submitted: {}, verified: {} };
|
||||||
this.profiles = null;
|
this.profiles = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,6 +53,7 @@ export class ProfileService {
|
|||||||
.map(res => res.json())
|
.map(res => res.json())
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
this.idMap =
|
||||||
this.profiles = this.profiles || {};
|
this.profiles = this.profiles || {};
|
||||||
this.profiles[type] = data;
|
this.profiles[type] = data;
|
||||||
this.profiles[type].reduce((map, profile, i) => {
|
this.profiles[type].reduce((map, profile, i) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user