我有一个firebase的json是这样的。
--- userid: v5s8fd8f7 (the auth user id from firebase auth) I'd like to ...
-Hhnfdb743HvGdF (the post key)
|
--- user: josh
|
--- profile: /img/img.jpg
|
--- userid: v5s8fd8f7 (the auth user id from firebase auth)
You're using
"posts": {
"$uid": {
".read": true,
".write": "auth != null &&
auth.uid == data.child('userid').val()"
}
}
to look up the UID, which is the data as is exists
/posts/-Hhnfdb743HvGdF/userid/v5s8fd8f7
before
this operation. To get the data as it exists