@@ -391,11 +391,11 @@ - (id) init
391
391
}
392
392
393
393
RCT_EXPORT_METHOD (set:(NSString *) path
394
- value :(NSDictionary *)value
394
+ data :(NSDictionary *)data
395
395
callback:(RCTResponseSenderBlock) callback)
396
396
{
397
397
FIRDatabaseReference *ref = [self getPathRef: path];
398
- [ref setValue: value withCompletionBlock: ^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
398
+ [ref setValue: [data valueForKey: @" value" ] withCompletionBlock: ^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
399
399
[self handleCallback: @" set" callback: callback databaseError: error];
400
400
}];
401
401
}
@@ -420,7 +420,7 @@ - (id) init
420
420
}
421
421
422
422
RCT_EXPORT_METHOD (push:(NSString *) path
423
- props :(NSDictionary *) props
423
+ data :(NSDictionary *) data
424
424
callback:(RCTResponseSenderBlock) callback)
425
425
{
426
426
FIRDatabaseReference *ref = [self getPathRef: path];
@@ -429,8 +429,8 @@ - (id) init
429
429
NSURL *url = [NSURL URLWithString: newRef.URL];
430
430
NSString *newPath = [url path ];
431
431
432
- if ([props count ] > 0 ) {
433
- [newRef setValue: props withCompletionBlock: ^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
432
+ if ([data count ] > 0 ) {
433
+ [newRef setValue: [data valueForKey: @" value " ] withCompletionBlock: ^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
434
434
if (error != nil ) {
435
435
// Error handling
436
436
NSDictionary *evt = @{
0 commit comments