Use StatusBackendClient in native code and pass message argument

This commit is contained in:
Icaro Motta 2024-12-12 02:15:06 -03:00
parent 2402264af3
commit 6039a40dcf
No known key found for this signature in database
GPG Key ID: 009557D9D014DF07
2 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,7 @@ class StatusModule(private val reactContext: ReactApplicationContext, private va
fun intendedPanic(message: String) { fun intendedPanic(message: String) {
StatusBackendClient.executeStatusGoRequest( StatusBackendClient.executeStatusGoRequest(
endpoint = "IntendedPanic", endpoint = "IntendedPanic",
requestBody = "", requestBody = message,
statusgoFunction = { Statusgo.intendedPanic(message) }, statusgoFunction = { Statusgo.intendedPanic(message) },
) )
} }

View File

@ -113,7 +113,11 @@ RCT_EXPORT_METHOD(intendedPanic:(NSString *)message) {
#if DEBUG #if DEBUG
NSLog(@"IntendedPanic() method called"); NSLog(@"IntendedPanic() method called");
#endif #endif
StatusgoIntendedPanic(message); [StatusBackendClient executeStatusGoRequest:@"IntendedPanic"
body:message
statusgoFunction:^NSString *{
return StatusgoIntendedPanic(message);
}];
} }
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) { RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) {