Bugfix: null handeling
This commit is contained in:
@@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
|
|||||||
import {AngularFirestore} from '@angular/fire/firestore';
|
import {AngularFirestore} from '@angular/fire/firestore';
|
||||||
import {map} from 'rxjs/operators';
|
import {map} from 'rxjs/operators';
|
||||||
import {User, UserDB} from './user.model';
|
import {User, UserDB} from './user.model';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable, of} from 'rxjs';
|
||||||
import {Role} from './roles.model';
|
import {Role} from './roles.model';
|
||||||
import {RoleDefinitions} from './role.definition';
|
import {RoleDefinitions} from './role.definition';
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ export class AccessRightService {
|
|||||||
|
|
||||||
public getUserInfo(userId: string): Observable<User> {
|
public getUserInfo(userId: string): Observable<User> {
|
||||||
if (userId === null) {
|
if (userId === null) {
|
||||||
return null;
|
return of(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
const user$ = this.angularFirestore
|
const user$ = this.angularFirestore
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
api: 'https://test.benjamin-ifland.de'
|
api: 'https://test.benjamin-ifland.de',
|
||||||
|
firebase: {
|
||||||
|
apiKey: 'AIzaSyBcIa6m8F7fT4gRLTx2zcBufUEE81gWVFg',
|
||||||
|
authDomain: 'worshipgenerator.firebaseapp.com',
|
||||||
|
databaseURL: 'https://worshipgenerator.firebaseio.com',
|
||||||
|
projectId: 'worshipgenerator',
|
||||||
|
storageBucket: 'worshipgenerator.appspot.com',
|
||||||
|
messagingSenderId: '317378238562',
|
||||||
|
appId: '1:317378238562:web:552ca27bc5e9086e'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user