Change registerServer method to return operational seed after successful registration
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:waylume_server/core/utils.dart';
|
||||
import 'package:waylume_server/services/rolling_codes_service.dart';
|
||||
|
||||
class ServerService {
|
||||
static Future<void> registerServer() async {
|
||||
static Future<String> registerServer() async {
|
||||
await RollingCodesService.initialize();
|
||||
|
||||
// Server always registers on startup to get fresh operational seed
|
||||
@@ -60,6 +60,7 @@ class ServerService {
|
||||
// Store operational seed in memory (no persistence needed)
|
||||
RollingCodesService.setOperationalSeed(responseData['operational_seed']);
|
||||
print('Server registered successfully with server-manager');
|
||||
return responseData['operational_seed'];
|
||||
} else {
|
||||
throw Exception('Registration failed: ${responseData['error']}');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user