sidferreira / aor-firebase-client

Firebase client for Admin on Rest
MIT License
57 stars 29 forks source link

Data are created but not with the correct path on firebase #7

Closed Mcdostone closed 7 years ago

Mcdostone commented 7 years ago

Hi guys !

First of all, thanks for your library :) I have a issue when I want to insert data in firebase ! Data are inserted but not in the correct path on firebase !

This is my route when I want to create an event for example: http://localhost:3000/admin/events/create

sans titre

I would to like that data are inserted into /events, but here data are saved in /admin/events. This is normal because your library uses the basepath which corresponds to the location path: restClient.js#L142

Maybe, it could be better to to get the firebase reference on the resource, not on the basepath, like you do

Thanks in advance !

sidferreira commented 7 years ago

Indeed!!! Fixing!

Mcdostone commented 7 years ago

Cool 👍 You have probably the same fix to apply for UPDATE and DELETE !

Thanks for you reactivity !

sidferreira commented 7 years ago

@Mcdostone I wasn't expecting people use this fast TBH. Just published 0.0.8.