我正在尝试从Javascript更新我的firebase数据库中的一个字段。我使用的代码是:
var config = {
apiKey: "xxxxxxxxxxxxxxx",
authDomain: "yyyyyyyyy",
databaseURL: "https://yuyuyu.firebaseio.com/",
projectId: "demo1233xyz",
};
firebase.initializeApp(config);
var database = firebase.database();
database.ref("-UserTable/-LGDHSJSKSIUSN178").update({ verified: false });
但这会在firebase中创建一个新条目,而不是更新相同的记录。请在下面找到一个示例屏幕截图。
有没有人可以帮助我理解如何通过Javascript更新表中的现有字段。
https://stackoverflow.com/questions/50881414
复制相似问题