mirror of
				https://github.com/hackku21/loc-chain-backend.git
				synced 2025-06-13 12:53:59 +00:00 
			
		
		
		
	Added ability to remove exposure
This commit is contained in:
		
							parent
							
								
									0580d2274f
								
							
						
					
					
						commit
						c66baddc50
					
				@ -45,6 +45,8 @@ export class Exposure extends Unit {
 | 
			
		||||
     */
 | 
			
		||||
    public async up() {
 | 
			
		||||
        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.')
 | 
			
		||||
            if ( !this.claim() ) return
 | 
			
		||||
            // await this.firebase.trylock('block', 'Exposure_child_added')
 | 
			
		||||
@ -59,8 +61,6 @@ export class Exposure extends Unit {
 | 
			
		||||
 | 
			
		||||
            this.release()
 | 
			
		||||
            // await this.firebase.unlock('block')*/
 | 
			
		||||
 | 
			
		||||
            this.blockchain.submitExposures(snapshot.val())
 | 
			
		||||
        })
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user