Firebase数据库规则的语法错误

编程入门 行业动态 更新时间:2024-10-27 08:24:07
本文介绍了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数据库规则的语法错误

本文发布于:2023-10-28 00:40:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1534992.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:规则   语法错误   数据库   Firebase

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!