Better form and remove squares
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Signed-off-by: Nikolai Rodionov <allanger@posteo.de>
This commit is contained in:
@@ -63,9 +63,13 @@ class AuthorizationController extends AsyncNotifier<AuthState> {
|
||||
final accountsGrpc = ref.read(publicAccountsGrpcProvider);
|
||||
final tokenCtrl = ref.read(tokensControllerProvider.notifier);
|
||||
|
||||
final response = await accountsGrpc.signIn(form.toProto());
|
||||
await tokenCtrl.writeTokenPair(Tokens.fromProto(response.tokenPair));
|
||||
return state.value!.copyWith(isAuthorized: true);
|
||||
try {
|
||||
final response = await accountsGrpc.signIn(form.toProto());
|
||||
await tokenCtrl.writeTokenPair(Tokens.fromProto(response.tokenPair));
|
||||
return state.value!.copyWith(isAuthorized: true);
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user