Created
June 6, 2021 18:04
-
-
Save JohnAllen/6fe2f1f55addadd154387afb6390ce97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const admin = require("firebase-admin") // required | |
const projectId = "lingo-e9b0f" | |
admin.initializeApp({ projectId }) | |
const db = admin.firestore() | |
async function getMarker() { | |
let count = 0; | |
const snapshot = await admin.firestore().collection('sentence-pairs').get() | |
const less = snapshot.docs.map(async doc => { | |
const sent = {id: doc.id, ...doc.data()} | |
if (!sent.tgtLeastFreq) { | |
const res = await db.collection('sentence-pairs').doc(sent.id).delete(); | |
} | |
}) | |
} | |
getMarker() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment