Added ability to remove exposure

main
QiTao Weng 3 years ago
parent 0580d2274f
commit c66baddc50

@ -45,6 +45,8 @@ export class Exposure extends Unit {
*/ */
public async up() { public async up() {
this.firebase.ref('exposure').on('child_added', (snapshot) => { this.firebase.ref('exposure').on('child_added', (snapshot) => {
this.blockchain.submitExposures(snapshot.val())
this.firebase.ref('exposure').child(snapshot.val()).remove()
/*this.logging.debug('Received child_added event for exposures reference.') /*this.logging.debug('Received child_added event for exposures reference.')
if ( !this.claim() ) return if ( !this.claim() ) return
// await this.firebase.trylock('block', 'Exposure_child_added') // await this.firebase.trylock('block', 'Exposure_child_added')
@ -59,8 +61,6 @@ export class Exposure extends Unit {
this.release() this.release()
// await this.firebase.unlock('block')*/ // await this.firebase.unlock('block')*/
this.blockchain.submitExposures(snapshot.val())
}) })
} }

Loading…
Cancel
Save