...
This commit is contained in:
@@ -69,8 +69,14 @@ namespace Back.Controllers
|
||||
_servSendMsg.Authentication(_getVerificationValidation.verificationCode.prm, ID.ToString());
|
||||
break;
|
||||
|
||||
|
||||
case "ChangeUserName":
|
||||
_servSendMsg.Authentication(_getVerificationValidation.verificationCode.val, ID.ToString());
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return BadRequest("این نوع احراز تعریف نشده");
|
||||
return BadRequest(new List<string> { "این نوع احراز تعریف نشده" });
|
||||
}
|
||||
|
||||
return NoContent();
|
||||
@@ -79,7 +85,7 @@ namespace Back.Controllers
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<bool>> Submit(VerificationCodeDto item)
|
||||
{
|
||||
var VerificationCode= await _servValidatinMsg.GetVerificationCode(item.ID);
|
||||
var VerificationCode= await _servValidatinMsg.GetVerificationCodeByID(item.ID);
|
||||
if (VerificationCode==null)
|
||||
return NotFound("آیتمی یافت نشد");
|
||||
|
||||
@@ -101,8 +107,12 @@ namespace Back.Controllers
|
||||
//else return BadRequest();
|
||||
break;
|
||||
|
||||
case "ChangeUserName":
|
||||
Sucstatus = await _servUser.ChangeUserName(VerificationCode.val, Convert.ToInt32(VerificationCode.prm));
|
||||
break;
|
||||
|
||||
default:
|
||||
return BadRequest("این نوع احراز تعریف نشده");
|
||||
return BadRequest(new List<string> { "این نوع احراز تعریف نشده" });
|
||||
}
|
||||
|
||||
if (Sucstatus)
|
||||
@@ -110,17 +120,17 @@ namespace Back.Controllers
|
||||
|
||||
return Ok(Sucstatus);
|
||||
}
|
||||
else return BadRequest("اطلاعات شما منطبق با سامانه نیست");
|
||||
else return BadRequest(new List<string> { "اطلاعات شما منطبق با سامانه نیست" });
|
||||
|
||||
}
|
||||
else return BadRequest("کد احراز صحیح نمی باشد");
|
||||
else return BadRequest(new List<string> { "کد احراز صحیح نمی باشد" });
|
||||
|
||||
}
|
||||
[HttpDelete("Remove/{ID}")]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<bool>> Remove(int ID)
|
||||
{
|
||||
var VerificationCode = await _servValidatinMsg.GetVerificationCode(ID);
|
||||
var VerificationCode = await _servValidatinMsg.GetVerificationCodeByID(ID);
|
||||
await _servValidatinMsg.Delete(VerificationCode);
|
||||
return NoContent();
|
||||
}
|
||||
|
Reference in New Issue
Block a user