Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to push child data with custom key? #260

Open
nicksantan opened this issue Aug 14, 2018 · 1 comment
Open

Possible to push child data with custom key? #260

nicksantan opened this issue Aug 14, 2018 · 1 comment

Comments

@nicksantan
Copy link

Hi there,

Please forgive the question if it's ignorant. When I use .push() I get a child with a firebase push id as the key. I would like to define the key myself (e.g. a project name). Is this possible? Or is the best way to accomplish this by taking a copy of the endpoint one level up with .fetch(), modifying it locally, and then using .update() or .post() to update the data at that endpoint?

@qwales1
Copy link
Collaborator

qwales1 commented Aug 16, 2018

@ChubbRck you could add the key you want in the endpoint ex. /users/<your-custom-key> and then post or update depending on your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants