This commit is contained in:
mmrbnjd
2025-08-03 23:01:44 +03:30
parent dace739e46
commit 65eeb4694e
5 changed files with 48 additions and 8 deletions

View File

@@ -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}")]