Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SABERGLOW authored Dec 10, 2021
1 parent dc5a91a commit 47d7466
Show file tree
Hide file tree
Showing 8 changed files with 8,531 additions and 0 deletions.
1 change: 1 addition & 0 deletions Firebase Functions/Firebase - GA Function/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
14 changes: 14 additions & 0 deletions Firebase Functions/Firebase - GA Function/functions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const functions = require('firebase-functions');

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
var admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
var database=admin.database();
exports.doorFunction = functions.https.onRequest(async(request, response) => {
let params = request.body.queryResult.parameters;
console.log("params are ", params)
await database.ref().update(params)
response.send("Door Functions was invoked successfully...");
});
Loading

0 comments on commit 47d7466

Please sign in to comment.