From 16614b44299b3ec85a57743916e0b53e7ac4335e Mon Sep 17 00:00:00 2001 From: Matthew Patrick Date: Tue, 17 May 2022 13:31:03 +0700 Subject: [PATCH] api - Fixed loginPost handling --- lib/api/api.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/api/api.dart b/lib/api/api.dart index edba009..57700a8 100644 --- a/lib/api/api.dart +++ b/lib/api/api.dart @@ -35,7 +35,7 @@ Future loginPost(data) async { options: Options( contentType: Headers.formUrlEncodedContentType, validateStatus: (status) { - return status! < 400; + return status! < 500; }, ), ); @@ -85,6 +85,7 @@ Future checkoutPost(session, data) async { } Future subscribe(email) async { - var req = await Dio().get('$host/subscribe', queryParameters: {'email': email}); + var req = + await Dio().get('$host/subscribe', queryParameters: {'email': email}); return req.statusCode; -} \ No newline at end of file +}