Merge pull request #58 from alexkuttig/master
fixed onDisconnectSet on iOS
This commit is contained in:
commit
c40de1b3f1
|
@ -614,28 +614,17 @@ RCT_EXPORT_METHOD(off:(NSString *)path
|
||||||
}
|
}
|
||||||
|
|
||||||
// On disconnect
|
// On disconnect
|
||||||
RCT_EXPORT_METHOD(onDisconnectSetObject:(NSString *) path
|
RCT_EXPORT_METHOD(onDisconnectSet:(NSString *) path
|
||||||
props:(NSDictionary *) props
|
props:(NSDictionary *) props
|
||||||
callback:(RCTResponseSenderBlock) callback)
|
callback:(RCTResponseSenderBlock) callback)
|
||||||
{
|
{
|
||||||
FIRDatabaseReference *ref = [self getPathRef:path];
|
FIRDatabaseReference *ref = [self getPathRef:path];
|
||||||
[ref onDisconnectSetValue:props
|
[ref onDisconnectSetValue:props[@"value"]
|
||||||
withCompletionBlock:^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
|
withCompletionBlock:^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
|
||||||
[self handleCallback:@"onDisconnectSetObject" callback:callback databaseError:error];
|
[self handleCallback:@"onDisconnectSetObject" callback:callback databaseError:error];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(onDisconnectSetString:(NSString *) path
|
|
||||||
val:(NSString *) val
|
|
||||||
callback:(RCTResponseSenderBlock) callback)
|
|
||||||
{
|
|
||||||
FIRDatabaseReference *ref = [self getPathRef:path];
|
|
||||||
[ref onDisconnectSetValue:val
|
|
||||||
withCompletionBlock:^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) {
|
|
||||||
[self handleCallback:@"onDisconnectSetString" callback:callback databaseError:error];
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(onDisconnectRemove:(NSString *) path
|
RCT_EXPORT_METHOD(onDisconnectRemove:(NSString *) path
|
||||||
callback:(RCTResponseSenderBlock) callback)
|
callback:(RCTResponseSenderBlock) callback)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue