-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
// https://github.com/firebase/firebase-tools/issues/1532 if (admin.apps.length === 0) { admin.initializeApp() } export const deleteAllUserJobs = functions.https.onCall(async (context: functions.https.CallableRequest) => { const uid = context.auth?.uid if (uid === undefined) { throw new functions.https.HttpsError("unauthenticated", "You need to be authenticated to perform this action") } const firestore = admin.firestore() const collectionRef = firestore.collection(`/users/${uid}/jobs`) const collection = await collectionRef.get() logger.debug(`Deleting ${collection.docs.length} docs at "/users/${uid}/jobs"`) // transaction version await firestore.runTransaction(async (transaction) => { for (const doc of collection.docs) { transaction.delete(firestore.doc(`/users/${uid}/jobs/${doc.id}`)) } }) logger.debug(`Deleted ${collection.docs.length} docs at "/users/${uid}/jobs"`) return {"success": true} })
Related posts
-
Show HN: My first NPM library – KV-to-JSON – turn key-values into nested JSON
-
Any Google Analytics Alternatives?
-
Step-by-Step Guide: Deploying a Full-Stack App on AWS EC2.
-
Claude AI launches on iOS (Android coming soon)
-
This Month in Solid #3: The Progress so Far, Meta Docs, New Fellows, and Production stories 😎