Merge branch 'master' of https://gitea.nxsir.cn/nanxun/IM_NEW
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using MessageService.WebApi.Application.Conversation;
|
||||
using IM.ASPNETCore;
|
||||
using MessageService.Infrastructure;
|
||||
using MessageService.WebApi.Application.Conversation;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Security.Claims;
|
||||
@@ -30,5 +32,13 @@ namespace MessageService.WebApi.Controllers.Conversation
|
||||
return Ok(await service.GetByIdAsync(id, Guid.Parse(userId)));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[UnitOfWork(typeof(MessageDbContext))]
|
||||
public async Task<IActionResult> MarkRead([FromQuery] Guid conversationId)
|
||||
{
|
||||
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||
return Ok(await service.MarkAsReadAsync(conversationId, Guid.Parse(userId)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user