This commit is contained in:
mmrbnjd
2025-08-02 19:00:53 +03:30
parent 7fd53e5d5a
commit 4843890f9d
5 changed files with 158 additions and 35 deletions

View File

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