Проблема в том, что данные не вставляются.
Вот код node.js:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
var db = admin.firestore();
exports.signUp = functions.https.onCall((data, context) => {
const uuid = data.uuid;
const name = data.name;
const gender = data.gender;
const age = data.age;
var docRef = db.collection('users').doc(uuid).set({
name: name,
gender: gender,
age: age,
current_point: 0,
point_charging: 0,
init_timestamp: admin.database.ServerValue.TIMESTAMP,
update_timestamp: admin.database.ServerValue.TIMESTAMP
}).then(function() {
console.log("Document successfully written!");
return;
}).catch(function(error) {
console.error("Error writing document: ", error);
return;
});
});
Результаты журнала функций firebase:
Однако моя база данных все еще пуста.Я не могу найти свою ошибку.Справка.