🐛 Dozens of bug fixes

This commit is contained in:
2025-07-20 02:31:50 +08:00
parent 903008d397
commit 18db50d80c
33 changed files with 359 additions and 318 deletions

View File

@@ -106,7 +106,7 @@ class AuthFactorSheet extends HookConsumerWidget {
showLoadingModal(context);
final client = ref.read(apiClientProvider);
await client.post(
'/accounts/me/factors/${factor.id}/enable',
'/id/accounts/me/factors/${factor.id}/enable',
data: jsonEncode(password),
);
if (context.mounted) Navigator.pop(context, true);
@@ -193,7 +193,7 @@ class AuthFactorNewSheet extends HookConsumerWidget {
showLoadingModal(context);
final apiClient = ref.read(apiClientProvider);
final resp = await apiClient.post(
'/accounts/me/factors',
'/id/accounts/me/factors',
data: {'type': factorType.value, 'secret': secretController.text},
);
final factor = SnAuthFactor.fromJson(resp.data);

View File

@@ -174,7 +174,7 @@ class AccountConnectionNewSheet extends HookConsumerWidget {
if (context.mounted) showLoadingModal(context);
await client.post(
'/auth/connect/apple/mobile',
'/id/auth/connect/apple/mobile',
data: {
'identity_token': credential.identityToken!,
'authorization_code': credential.authorizationCode,
@@ -336,7 +336,7 @@ class AccountConnectionsSheet extends HookConsumerWidget {
try {
final client = ref.read(apiClientProvider);
await client.delete(
'/accounts/me/connections/${connection.id}',
'/id/accounts/me/connections/${connection.id}',
);
ref.invalidate(accountConnectionsProvider);
return true;

View File

@@ -160,7 +160,7 @@ class ContactMethodNewSheet extends HookConsumerWidget {
showLoadingModal(context);
final apiClient = ref.read(apiClientProvider);
await apiClient.post(
'/accounts/me/contacts',
'/id/accounts/me/contacts',
data: {'type': contactType.value, 'content': contentController.text},
);
if (context.mounted) {