timezone change
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-02-25 05:06:12 +08:00
parent c69d3e6a6c
commit 2077407958
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ namespace _2021_backend.Controllers
var stu = context.Students.FirstOrDefault(e => e.Stuid == stuid);
if (stu == null) return Ok(ApiResponse.Error("INVALID_STUID"));
else if (DateTime.Now - stu.LastCaptchaTime < TimeSpan.FromMinutes(1)) return Ok(ApiResponse.Error($"ALREADY_SENT,{DateTime.Now.ToString("f")},{stu.LastCaptchaTime.ToString("f")}"));
else if (DateTime.Now - stu.LastCaptchaTime < TimeSpan.FromMinutes(1)) return Ok(ApiResponse.Error($"ALREADY_SENT"));
var result = await TencentSMS.Send(context, SMSType.Captcha, stu, "smsbot");
if (!result) return Ok(ApiResponse.Error("SEND_ERROR"));
return Ok(ApiResponse.Success("success"));