修改邮件国际化提示语

This commit is contained in:
2023-06-12 13:34:13 +08:00
parent 79e556ac80
commit 961b76fd1e
2 changed files with 35 additions and 25 deletions
@@ -205,6 +205,8 @@ namespace IRaCIS.Api.Controllers
var token = decodeUrl.Substring(decodeUrl.IndexOf("access_token=") + "access_token=".Length);
var lang = decodeUrl.Substring(decodeUrl.IndexOf("lang=") + "lang=".Length, 2);
var domainStrList = decodeUrl.Split("/").ToList().Take(3).ToList();
var errorUrl = domainStrList[0]+"//"+ domainStrList[2]+ "/error";
@@ -212,7 +214,7 @@ namespace IRaCIS.Api.Controllers
if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
{
decodeUrl = errorUrl+ $"?ErrorMessage={System.Web.HttpUtility.UrlEncode("")} ";
decodeUrl = errorUrl+ $"?ErrorMessage={System.Web.HttpUtility.UrlEncode(lang=="zh"? "": "ErrorThe initialization link has expired. Return")} ";
}
return Redirect(decodeUrl);