【发布时间】:2018-07-28 23:00:17
【问题描述】:
我正在使用 React.js 构建一个应用程序,用户可以在其中创建某个投票,并将其保存到 firebase。用户自己可以看到他创建的所有民意调查的菜单。数据在 firebase 中组织如下:
Users:
-XXXXXX: (the user UID)
-YYYYYY: (firebase's random string name, that represents a single poll)
options: [1,2,3],
question: "What color is the sun?",
values: ["yellow","red","orange"]
-YYYYYY: ... (another poll the user created)
-YYYYYY: ... (third poll the user created)
现在,每个投票都位于不同的链接,即 /YYYYYY
在投票链接网站上,我正在尝试获取当前投票的投票数据。如果用户未登录(我希望任何人都能够投票),我遇到的问题是获取数据本身。
有没有办法“跳过”创建投票的用户,并到达投票 YYYYYY 及其数据?
【问题讨论】:
标签: javascript firebase firebase-realtime-database