This commit is contained in:
2026-08-31 14:42:22 +08:00
72 changed files with 2479 additions and 168 deletions
@@ -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)));
}
}
}