...
This commit is contained in:
@@ -128,12 +128,13 @@ namespace Hushian.WebApi.Controllers.v1
|
||||
{
|
||||
|
||||
int CompanyID = 0;
|
||||
int? ExperID = null;
|
||||
if (User.IsInRole("Exper"))
|
||||
{
|
||||
string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First();
|
||||
int ExperID = Convert.ToInt32(strExperID);
|
||||
ExperID = Convert.ToInt32(strExperID);
|
||||
|
||||
CompanyID = await _experService.GetCompanyIDExper(ExperID);
|
||||
CompanyID = await _experService.GetCompanyIDExper(ExperID.Value);
|
||||
}
|
||||
else if (User.IsInRole("Company"))
|
||||
{
|
||||
@@ -141,7 +142,7 @@ namespace Hushian.WebApi.Controllers.v1
|
||||
CompanyID = Convert.ToInt32(strCompanyID);
|
||||
}
|
||||
|
||||
return await _chatService.FinishChat(ChatID, CompanyID) ? NoContent()
|
||||
return await _chatService.FinishChat(ChatID, CompanyID, ExperID) ? NoContent()
|
||||
: BadRequest(new List<string> { "خطا در بروزرسانی وضعیت" });
|
||||
}
|
||||
[HttpPut("OpenChat/{ChatID}")]
|
||||
|
Reference in New Issue
Block a user