feat: fixbug
Some checks failed
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (push) Has been cancelled
Build Windows / build (push) Has been cancelled

This commit is contained in:
speakeloudest 2025-11-02 01:58:04 -07:00
parent 2b80fcba0d
commit cf297caf09
3 changed files with 24 additions and 1 deletions

View File

@ -28,7 +28,7 @@ import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_control
import 'package:kaer_with_panels/app/modules/kr_home/models/kr_home_views_status.dart';
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:kaer_with_panels/app/utils/kr_init_log_collector.dart';
// import 'package:kaer_with_panels/app/utils/kr_init_log_collector.dart';
class KRSplashController extends GetxController {
// 🔧

View File

@ -25,6 +25,9 @@ abstract class Api {
///
static const String kr_deleteAccount = "/v1/public/user/delete_account";
/// -
static const String kr_setNewPsdByForgetPsd = "/v1/app/auth/reset_password";
/// -
static const String kr_resetPassword = "/v1/auth/reset";

View File

@ -76,6 +76,26 @@ class KRAuthApi {
return right(subscription.isFullySubscribed);
}
/// -
Future<Either<HttpError, String>> kr_setNewPsdByForgetPsd(
String email, String code, String password) async {
final Map<String, dynamic> data = <String, dynamic>{};
data['email'] = email;
data['password'] = password;
data["code"] = code;
data["identifier"] = KRDeviceInfoService().deviceId ?? 'unknown';
BaseResponse<KRLoginData> baseResponse = await HttpUtil.getInstance()
.request<KRLoginData>(Api.kr_setNewPsdByForgetPsd, data,
method: HttpMethod.POST, isShowLoading: true);
if (!baseResponse.isSuccess) {
return left(
HttpError(msg: baseResponse.retMsg, code: baseResponse.retCode));
}
return right(baseResponse.model.kr_token.toString());
}
/// +
Future<Either<HttpError, String>> kr_register(
String email,