From 4220af1c24cd23b6c5eaa24aa8d551562e89531c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neryt=20Alexander=20Herrera=20I=C3=B1iguez?= Date: Thu, 8 Oct 2020 12:39:33 -0500 Subject: [PATCH] update Como son funciones en la nube basta con hacer admin.initializeApp(); y hace lo mismo que tener una cuenta de servicio, y en un principio lo que borre ya no se usa --- functions/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/functions/index.js b/functions/index.js index 16ad28c..f52b407 100644 --- a/functions/index.js +++ b/functions/index.js @@ -1,11 +1,7 @@ const functions = require('firebase-functions'); const admin = require("firebase-admin"); -const serviceAccount = require("./serviceAccountKey.json"); -admin.initializeApp({ - credential: admin.credential.cert(serviceAccount), - databaseURL: "" -}); +admin.initializeApp(); const db = admin.database(); const ref = db.ref('/assistant'); @@ -31,4 +27,4 @@ exports.saveData = functions.https.onRequest((request, response) => { } else { response.status(500).send('No tienes permisos') } -}); \ No newline at end of file +});