Make getConfiguration return a promise

This commit is contained in:
Will Anderson
2015-09-01 14:01:10 -07:00
parent 7adc4085d1
commit 87f0e26571
2 changed files with 11 additions and 16 deletions

View File

@@ -80,9 +80,10 @@ RCT_EXPORT_METHOD(setUsingTestFolder:(BOOL) shouldUseTestFolder)
usingTestFolder = shouldUseTestFolder;
}
RCT_EXPORT_METHOD(getConfiguration:(RCTResponseSenderBlock)callback)
RCT_EXPORT_METHOD(getConfiguration:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
{
callback(@[[NSNull null], [CodePushConfig getConfiguration]]);
resolve([CodePushConfig getConfiguration]);
}
RCT_EXPORT_METHOD(installUpdate:(NSDictionary*)updatePackage