...
This commit is contained in:
@@ -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")]
|
||||
|
Reference in New Issue
Block a user