本文介绍了Firebase数据库规则的语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
{
"rules": {
"Users": {
"$user_id": {
// grants write access to the owner of this user account
// whose uid must exactly match the key ($user_id)
".write": "$user_id === auth.uid"
}
}
"$businessName": {
".write": "root.child('Users').child(auth.uid).child($businessName).child('Permission s').val() === 'MODERATOR'"
}
}
}
这给我一个错误:保存规则错误 - 第10行:期望的','或'}'。这个错误说我缺少一个括号,因为某些原因我错过了一个逗号或者什么东西?
This is giving me an error: Error saving rules - Line 10: Expected ',' or '}'. The error says im missing a bracket for some reason did i miss a comma or something?
刚刚在$ businessName之前缺少逗号
As @Frank van Puffelen said i was just missing a comma before "$businessName"
更多推荐
Firebase数据库规则的语法错误
发布评论