...
This commit is contained in:
@@ -206,12 +206,12 @@ namespace Hushian.WebApi.Controllers.v1
|
||||
[Authorize(Roles = "Company,User,Exper")]
|
||||
public async Task<ActionResult> MarkAsReadChatItem(int ConversationItemID)
|
||||
{
|
||||
int? ExperID = null;
|
||||
int? ID = null;
|
||||
ConversationType Type = ConversationType.UE;
|
||||
if (User.IsInRole("Exper"))
|
||||
{
|
||||
string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First();
|
||||
ExperID = Convert.ToInt32(strExperID);
|
||||
ID = Convert.ToInt32(strExperID);
|
||||
Type = ConversationType.EU;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace Hushian.WebApi.Controllers.v1
|
||||
}
|
||||
else return Unauthorized();
|
||||
|
||||
return await _chatService.MarkAsReadChatItem(ConversationItemID, Type, ExperID) ? NoContent()
|
||||
return await _chatService.MarkAsReadChatItem(ConversationItemID, Type, ID) ? NoContent()
|
||||
: BadRequest(new List<string>() { "خطا در بروزرسانی گفتگو" });
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user