This commit is contained in:
mmrbnjd
2024-04-29 18:15:46 +03:30
parent 7b8127dc72
commit 319270d567
20 changed files with 356 additions and 96 deletions

View File

@@ -60,7 +60,7 @@ namespace Back.Controllers
[HttpPost("CreateCsrAndPrivateKey")]
public async Task<ActionResult<TaxToolsDTO>> CreateCsrAndPrivateKey(CsrPrivateKeyDto model)
{
var resultValidationmodel = await _mobilevalidation.ValidateAsync(Tuple.Create(model.Mobile,false));
var resultValidationmodel = await _mobilevalidation.ValidateAsync(Tuple.Create(model.Mobile, ActionMobileValidation.No));
if (!resultValidationmodel.IsValid)
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());
return Ok(await _sBase.CreateCsrAndPrivateKey(model));
@@ -164,7 +164,7 @@ namespace Back.Controllers
// Type = "catch"
//};
//_contextMongodb.InsertItem(log);
return BadRequest("خطای سیستمی رخ داده");
return BadRequest(new List<string> { "خطای سیستمی رخ داده" });
}
}
@@ -172,7 +172,7 @@ namespace Back.Controllers
[AllowAnonymous]
public async Task<ActionResult<string>> ForgetPassWord(ForgetPasswordItem Item)
{
var resultValidationmodel = await _mobilevalidation.ValidateAsync(Tuple.Create(Item.Username, true));
var resultValidationmodel = await _mobilevalidation.ValidateAsync(Tuple.Create(Item.Username, ActionMobileValidation.ExistMobile));
if (!resultValidationmodel.IsValid)
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());