Skip to content

Commit

Permalink
Use one Firebase project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelyfan committed Aug 22, 2020
1 parent d83fe4a commit 258f5d7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/app/modules/backend/services/factory/factory.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export class RoutesAngularFirestore extends AngularFirestore { }
export class CheckinAngularFirestore extends AngularFirestore { }

export function RoutesAngularFirestoreFactory(platformId: Object, zone: NgZone): RoutesAngularFirestore {
return new RoutesAngularFirestore(environment.firebaseConfigRoutes, 'route-recorder', false, null, platformId, zone, null);
return new RoutesAngularFirestore(environment.firebaseConfigRoutes, 'gt-recycling', false, null, platformId, zone, null);
}
export function CheckinAngularFirestoreFactory(platformId: Object, zone: NgZone): CheckinAngularFirestore {
return new RoutesAngularFirestore(environment.firebaseConfigCheckin, 'recycling-checkin', false, null, platformId, zone, null);
return new CheckinAngularFirestore(environment.firebaseConfigCheckin, 'gt-recycling', false, null, platformId, zone, null);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export class FirebaseCheckinService implements IBackendCheckin {
constructor(
private readonly firestore: CheckinAngularFirestore
) {
this.groupsCollection = this.firestore.collection<ICheckinGroup>('groups');
this.modelsCollection = this.firestore.collection<ICheckinModel>('models');
this.recordsCollection = this.firestore.collection<IFirestoreCheckinRecord>('records');
this.groupsCollection = this.firestore.collection<ICheckinGroup>('checkin_groups');
this.modelsCollection = this.firestore.collection<ICheckinModel>('checkin_models');
this.recordsCollection = this.firestore.collection<IFirestoreCheckinRecord>('checkin_records');
}

public getRecords(): Observable<ICheckinRecord[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export class FirebaseRoutesService implements IBackendRoutes {
private readonly firestore: RoutesAngularFirestore,
private helper: FirebaseHelperService,
) {
this.recordsCollection = this.firestore.collection<IFirestoreRouteRecord>('records');
this.routesCollection = this.firestore.collection<IRoute>('models');
this.groupsCollection = this.firestore.collection<IRouteGroup>('groups');
this.recordsCollection = this.firestore.collection<IFirestoreRouteRecord>('route_records');
this.routesCollection = this.firestore.collection<IRoute>('route_models');
this.groupsCollection = this.firestore.collection<IRouteGroup>('route_groups');
}

private convertRecord(rawRecord: IFirestoreRouteRecord): Observable<IRouteRecord> {
Expand Down
32 changes: 16 additions & 16 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
export const environment = {
production: false,
firebaseConfigRoutes: {
apiKey: "AIzaSyCHz8Yz0SigXL5xOioF_l2UzYpkrkdhC7Q",
authDomain: "route-recorder-de136.firebaseapp.com",
databaseURL: "https://route-recorder-de136.firebaseio.com",
projectId: "route-recorder-de136",
storageBucket: "route-recorder-de136.appspot.com",
messagingSenderId: "53721343327",
appId: "1:53721343327:web:f872ccfcc666c82fc7c2ea",
measurementId: "G-6K8HWZ5GME"
apiKey: "AIzaSyCYftHs5qR8ma2bEpT8NoKdE4lUyMHmbss",
authDomain: "gt-recycling.firebaseapp.com",
databaseURL: "https://gt-recycling.firebaseio.com",
projectId: "gt-recycling",
storageBucket: "gt-recycling.appspot.com",
messagingSenderId: "619187120497",
appId: "1:619187120497:web:1b419f3ad094e14458eed0",
measurementId: "G-SC438D4WT5"
},
firebaseConfigCheckin: {
apiKey: "AIzaSyALRmV3vAIOVrHgMnDlxqqwNjHpi7znJwA",
authDomain: "recycling-checkin.firebaseapp.com",
databaseURL: "https://recycling-checkin.firebaseio.com",
projectId: "recycling-checkin",
storageBucket: "recycling-checkin.appspot.com",
messagingSenderId: "872084182292",
appId: "1:872084182292:web:e1662524c924c46c4f1e01",
measurementId: "G-MER4YF3R63"
apiKey: "AIzaSyCYftHs5qR8ma2bEpT8NoKdE4lUyMHmbss",
authDomain: "gt-recycling.firebaseapp.com",
databaseURL: "https://gt-recycling.firebaseio.com",
projectId: "gt-recycling",
storageBucket: "gt-recycling.appspot.com",
messagingSenderId: "619187120497",
appId: "1:619187120497:web:1b419f3ad094e14458eed0",
measurementId: "G-SC438D4WT5"
}
};

Expand Down

0 comments on commit 258f5d7

Please sign in to comment.