manifold/web/lib/firebase/api-call.ts

10 lines
279 B
TypeScript
Raw Normal View History

2021-12-18 01:47:46 +00:00
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)
}