manifold/web/lib/firebase/api-call.ts
2021-12-17 19:47:46 -06:00

10 lines
279 B
TypeScript

import { app } from './init'
import { doc, collection, getFirestore, setDoc } from 'firebase/firestore'
const db = getFirestore(app)
export async function apiCall(apiCallDoc: any) {
const apiCallRef = doc(collection(db, 'api-calls'))
await setDoc(apiCallRef, apiCallDoc)
}