This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -278,15 +278,15 @@ firebase.setValue = function (path, val) {
278278} ;
279279
280280firebase . update = function ( path , val ) {
281- return new Promise ( function ( resolve , reject ) {
282- try {
283- instance . child ( path ) . updateChildren ( firebase . toHashMap ( val ) ) ;
284- resolve ( ) ;
285- } catch ( ex ) {
286- console . log ( "Error in firebase.update: " + ex ) ;
287- reject ( ex ) ;
288- }
289- } ) ;
281+ return new Promise ( function ( resolve , reject ) {
282+ try {
283+ instance . child ( path ) . updateChildren ( firebase . toHashMap ( val ) ) ;
284+ resolve ( ) ;
285+ } catch ( ex ) {
286+ console . log ( "Error in firebase.update: " + ex ) ;
287+ reject ( ex ) ;
288+ }
289+ } ) ;
290290} ;
291291
292292firebase . query = function ( updateCallback , path , options ) {
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ declare module "nativescript-plugin-firebase" {
116116 export function resetPassword ( options : ResetPasswordOptions ) : Promise < any > ;
117117 export function push ( path : string , value : any ) : Promise < PushResult > ;
118118 export function setValue ( path : string , value : any ) : Promise < any > ;
119+ export function update ( path : string , value : any ) : Promise < any > ;
119120 export function remove ( path : string ) : Promise < any > ;
120121 export function query ( onValueEvent : ( data : FBData ) => void , path : string , options : QueryOptions ) : Promise < any > ;
121122 export function addChildEventListener ( onChildEvent : ( data : FBData ) => void , path : string ) : Promise < any > ;
You can’t perform that action at this time.
0 commit comments