Changing values (true) for numtric on firebase database and ordering. | SoloLearn: Learn to code for FREE!

0

Changing values (true) for numtric on firebase database and ordering.

Hope you can help me with this, I'm new at backend, I'm working with javascript, nodejs and koa. I want to change the value of the property of an object, the value is true now but I want to change to numeric so I can order the "devices" and I want to put the last device purchased at the beginning of the list. The configuration of firebase is all set just need to work on this, I only have this by now but I think is just crap x$ .post('/device/:deviceId/position', function* updatePosition() { const deviceId = this.params.deviceId const newPosition = this.request.body.position const db = firebase.database().ref() db.firebase.dbRoot.child(`devices/${deviceId}/users`).update(db) this.body( deviceId, newPosition, db ) updatePosition() })

10/12/2018 6:06:15 PM

Miriam Guzmam

0 Answers

New Answer