I'm running into trouble saving and retrieving values in Firebase using Angularfire v2 (http://angularfire.com/documentationv2.html , v2 is necessary because v1 seemed unable to order items by priority)
It's a simple vote-up-down app using Persona Login for authorization, the problem comes when the user votes on a 'story', I want to add his user id to 'story/users', but it seems the only way to do that without erasing all the other values is to use '$add'(push), which throws in a random key name which I have no idea how to query against.
So to prevent double voting I have to somehow ask if 'story/users' already has that user's id in there.
story---
users---
-J9LrtJwXnCI3ZYqsIz1: user-1
-J9Lriauhfdoaiuhfafd: user-2
Does anybody have any idea how to find out if user-1 is in 'story/users'?
Keep in mind Angularfire v2 has some major changes.
And if anybody has a better idea I'd be happy to hear it (but I'm really trying to avoid saving it as user-1/story-id, for other reasons)