✨ Post reactions
This commit is contained in:
@ -29,10 +29,7 @@ class _SignInScreenState extends State<SignInScreen> {
|
||||
if (messages.last.contains('risk')) {
|
||||
final ticketId = RegExp(r'ticketId=(\d+)').firstMatch(messages.last);
|
||||
if (ticketId == null) {
|
||||
Get.showSnackbar(GetSnackBar(
|
||||
title: 'errorHappened'.tr,
|
||||
message: 'requested to multi-factor authenticate, but the ticket id was not found',
|
||||
));
|
||||
Get.snackbar('errorHappened'.tr, 'Requested to multi-factor authenticate, but the ticket id was not found');
|
||||
}
|
||||
showDialog(
|
||||
context: context,
|
||||
|
@ -28,14 +28,14 @@ class _SignUpScreenState extends State<SignUpScreen> {
|
||||
|
||||
final client = GetConnect();
|
||||
client.httpClient.baseUrl = ServiceFinder.services['passport'];
|
||||
final res = await client.post('/api/users', {
|
||||
final resp = await client.post('/api/users', {
|
||||
'name': username,
|
||||
'nick': nickname,
|
||||
'email': email,
|
||||
'password': password,
|
||||
});
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
if (resp.statusCode == 200) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
@ -54,10 +54,7 @@ class _SignUpScreenState extends State<SignUpScreen> {
|
||||
AppRouter.instance.replaceNamed('auth.sign-in');
|
||||
});
|
||||
} else {
|
||||
Get.showSnackbar(GetSnackBar(
|
||||
title: 'errorHappened'.tr,
|
||||
message: res.bodyString,
|
||||
));
|
||||
Get.snackbar('errorHappened'.tr, resp.bodyString!);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user