MakeSchool-Tutorials / Makestagram-Swift-V3

14 stars 7 forks source link

23. Firebase Router #46

Closed scottpchow23 closed 7 years ago

scottpchow23 commented 7 years ago

For .newpost I believe the route is supposed to be return rootRef.child("posts").child(User.current.uid).childByAutoId() where the tutorial solution has only return root.child("posts").childByAutoId()

ocwang commented 7 years ago

Yep, you're right. Thanks!

I've removed User.current.uid from within the enum and passed it in through an associated value to keep the code decoupled.