From 83cf6ae91246f4640bfb947e5a98ff0390154118 Mon Sep 17 00:00:00 2001 From: AnonymousDotNet <18776095145@163.com> Date: Wed, 23 Oct 2024 15:35:05 +0800 Subject: [PATCH] fix: Set default values --- .../BotSharp.OpenAPI/Controllers/UserController.cs | 2 +- .../BotSharp.OpenAPI/ViewModels/Users/UserResetPasswordModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs b/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs index 253c19be..cb254f50 100644 --- a/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs +++ b/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs @@ -153,7 +153,7 @@ public class UserController : ControllerBase } [HttpPost("/user/phone/modify")] - public async Task ModifyUserPhone([FromQuery] string phone, [FromQuery] string regionCode) + public async Task ModifyUserPhone([FromQuery] string phone, [FromQuery] string regionCode = "CN") { return await _userService.ModifyUserPhone(phone, regionCode); } diff --git a/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Users/UserResetPasswordModel.cs b/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Users/UserResetPasswordModel.cs index df0601c5..0632a8f8 100644 --- a/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Users/UserResetPasswordModel.cs +++ b/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Users/UserResetPasswordModel.cs @@ -6,7 +6,7 @@ public class UserResetPasswordModel public string? Phone { get; set; } public string Password { get; set; } = string.Empty; public string VerificationCode { get; set; } - public string? RegionCode { get; set; } + public string RegionCode { get; set; } = "CN"; public User ToUser() {