mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Set to a working state.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { firestore } from "../firebase";
|
||||
|
||||
export interface ATCAPIInterface {
|
||||
get: CallableFunction
|
||||
@@ -6,10 +5,10 @@ export interface ATCAPIInterface {
|
||||
|
||||
export abstract class ATCAPI {
|
||||
|
||||
firestore;
|
||||
|
||||
|
||||
constructor() {
|
||||
this.firestore = firestore;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export class ATCFlightBoard {}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { ATCAPI, ATCAPIInterface } from "../ATCAPI";
|
||||
import { collection, getDocs } from "firebase/firestore";
|
||||
import { firebase } from "../../firebase";
|
||||
|
||||
export class ATCAPI_Flights extends ATCAPI implements ATCAPIInterface {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
get() {
|
||||
|
||||
async () => {
|
||||
const snapshot = await getDocs( collection( this.firestore, "flights" ) );
|
||||
|
||||
snapshot.forEach( doc => {
|
||||
console.log( doc.data() );
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// Import the functions you need from the SDKs you need
|
||||
import { initializeApp } from "firebase/app";
|
||||
import { getAnalytics } from "firebase/analytics";
|
||||
import { getFirestore } from "firebase/firestore";
|
||||
|
||||
// TODO: Add SDKs for Firebase products that you want to use
|
||||
// https://firebase.google.com/docs/web/setup#available-libraries
|
||||
|
||||
// Your web app's Firebase configuration
|
||||
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyArFxFtLvZqV6RKMxZR-zCH-TT3LV43aVg",
|
||||
authDomain: "dcs-olympus.firebaseapp.com",
|
||||
projectId: "dcs-olympus",
|
||||
storageBucket: "dcs-olympus.appspot.com",
|
||||
messagingSenderId: "393187308632",
|
||||
appId: "1:393187308632:web:545dc9551716a84d3c462d",
|
||||
measurementId: "G-10E10S2WBN"
|
||||
};
|
||||
|
||||
// Initialize Firebase
|
||||
const firebase = initializeApp( firebaseConfig );
|
||||
|
||||
const analytics = getAnalytics( firebase );
|
||||
const firestore = getFirestore( firebase );
|
||||
|
||||
|
||||
export { firebase, analytics, firestore };
|
||||
@@ -102,9 +102,6 @@ function setup() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* Default values */
|
||||
|
||||
Reference in New Issue
Block a user