forked from bchanot/claude
Always-on rules/secure-by-default.md: hosting, a11y, Supabase RLS, SMS/email consent, cloud functions, API hygiene incl. password storage. Stdlib scanner (FAIL/WARN/MANUAL) + skill, 89-check suite, auditor gate wiring, profiles, routing row (plus Explore rows confirmed through the router dialog).
9 lines
320 B
JavaScript
9 lines
320 B
JavaScript
const { onDocumentCreated } = require("firebase-functions/v2/firestore");
|
|
const { setGlobalOptions } = require("firebase-functions/v2");
|
|
|
|
setGlobalOptions({ maxInstances: 10 });
|
|
|
|
exports.onOrder = onDocumentCreated("orders/{id}", async (event) => {
|
|
await db.collection("receipts").add({ order: event.params.id });
|
|
});
|