fix: validate

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-29 22:36:11 +08:00
parent b4ca42e0c0
commit 978f27c700
3 changed files with 17 additions and 4 deletions

View File

@@ -1,12 +1,18 @@
import 'package:PiliPlus/http/api.dart';
import 'package:PiliPlus/http/init.dart';
import 'package:PiliPlus/utils/storage.dart';
import 'package:dio/dio.dart';
class ValidateHttp {
static Future gaiaVgateRegister(String vVoucher) async {
final res = await Request().post(
Api.gaiaVgateRegister,
data: {'v_voucher': vVoucher},
queryParameters: {
if (Accounts.main.isLogin) 'csrf': Accounts.main.csrf,
},
data: {
'v_voucher': vVoucher,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
@@ -26,6 +32,9 @@ class ValidateHttp {
}) async {
final res = await Request().post(
Api.gaiaVgateValidate,
queryParameters: {
if (Accounts.main.isLogin) 'csrf': Accounts.main.csrf,
},
data: {
'challenge': challenge,
'seccode': seccode,