From cf429fcbd42a6f2b60982f9c376b7eea06346e1c Mon Sep 17 00:00:00 2001 From: benjamin Date: Sun, 11 Aug 2019 10:46:00 +0200 Subject: [PATCH] Bugfix: null handeling --- WEB/src/app/services/access-right.service.ts | 4 ++-- WEB/src/environments/environment.prod.ts | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/WEB/src/app/services/access-right.service.ts b/WEB/src/app/services/access-right.service.ts index 1d47d0d..c74d479 100644 --- a/WEB/src/app/services/access-right.service.ts +++ b/WEB/src/app/services/access-right.service.ts @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core'; import {AngularFirestore} from '@angular/fire/firestore'; import {map} from 'rxjs/operators'; import {User, UserDB} from './user.model'; -import {Observable} from 'rxjs'; +import {Observable, of} from 'rxjs'; import {Role} from './roles.model'; import {RoleDefinitions} from './role.definition'; @@ -18,7 +18,7 @@ export class AccessRightService { public getUserInfo(userId: string): Observable { if (userId === null) { - return null; + return of(null); } const user$ = this.angularFirestore diff --git a/WEB/src/environments/environment.prod.ts b/WEB/src/environments/environment.prod.ts index 4da1305..1289a90 100644 --- a/WEB/src/environments/environment.prod.ts +++ b/WEB/src/environments/environment.prod.ts @@ -1,4 +1,13 @@ export const environment = { 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' + } };