This commit is contained in:
mmrbnjd
2025-07-30 23:49:51 +03:30
parent 5731c9ff97
commit 96d6f5c004
4 changed files with 58 additions and 3 deletions

View File

@@ -41,6 +41,17 @@ namespace Hushian.WebApi.Controllers.v1
}
return Forbid();
}
[HttpGet("User/LastOpenChatInCompany/{CompanyID}")]
[Authorize(Roles = "User")]
public async Task<ActionResult> GetLastOpenChatInCompany(int CompanyID)
{
string strUserID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First();
int UserID = Convert.ToInt32(strUserID);
var response = await _chatService.GetLastOpenChatInCompany(CompanyID,UserID);
return response.Success ? Ok(response.Value) : Accepted() ;
}
[HttpGet("ChatsAwaitingOurResponse")]
[Authorize(Roles = "Company,Exper")]