From 95b50c6814da687cd70a7a30927c7e3d9126f09e Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 23 May 2022 01:05:13 +0700 Subject: [PATCH] Add submit otp api --- lib/api/api.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/api/api.dart b/lib/api/api.dart index a77e1d7..4069552 100644 --- a/lib/api/api.dart +++ b/lib/api/api.dart @@ -42,6 +42,20 @@ Future loginPost(data) async { return {'statusCode': req.statusCode, 'data': req.data}; } +Future otpPost(data) async { + Response req = await Dio().post( + ('$host/otp-submit'), + data: data, + options: Options( + contentType: Headers.formUrlEncodedContentType, + validateStatus: (status) { + return status! < 500; + }, + ), + ); + return {'statusCode': req.statusCode, 'data': req.data}; +} + Future resetPost(data) async { Response req = await Dio().post( ('$host/request-reset-password'),