надеюсь будет работать сукi

This commit is contained in:
Jganenokk
2026-07-05 23:43:15 +07:00
parent 7ce7cf7a1d
commit 815e41648a
10 changed files with 419 additions and 117 deletions
+6 -7
View File
@@ -269,16 +269,15 @@ class AccountModule {
final dataMap = data.cast<dynamic, dynamic>();
if (resolvedAccountId == null) {
final profileMap = dataMap['profile'];
if (profileMap is Map) {
final contact = profileMap['contact'];
if (contact is Map) {
resolvedAccountId = contact['id'] as int?;
}
}
resolvedAccountId = extractAccountId(dataMap);
if (resolvedAccountId == null) {
logger.e(
'login: accountId не найден в ответе; '
'${describeResponseShape(dataMap)}',
);
throw Exception('login: не удалось определить accountId из ответа');
}
logger.i('login: accountId=$resolvedAccountId определён из ответа');
await TokenStorage.saveToken(authToken, resolvedAccountId);
await TokenStorage.setActiveAccount(resolvedAccountId);
await SpoofingService.commitPendingSpoof(resolvedAccountId);