- 将 file 相关端点命名空间从小写改为首字母大写 - 将 im 相关端点命名空间从小写改为首字母大写 - 将 workflow 相关端点命名空间从小写改为首字母大写 - 将 rag 相关端点命名空间从小写改为首字母大写 - 将 platform 相关端点命名空间从小写改为首字母大写 - 保持代码功能不变,仅调整命名空间命名风格一致性
26 lines
764 B
C#
26 lines
764 B
C#
using BuildFlow.Shared.Domain.Common;
|
|
using IM.Application.Chat.Commands;
|
|
using MediatR;
|
|
|
|
namespace BuildFlow.Host.Endpoints.IM.Chat;
|
|
|
|
|
|
/// <summary>
|
|
/// 解散群组端点。DELETE /groups/{GroupId}。
|
|
/// </summary>
|
|
public class DeleteGroupEndpoint(IMediator mediator, ICurrentUserContext userContext) : Endpoint<DeleteGroupEndpointRequest>
|
|
{
|
|
public override void Configure()
|
|
{
|
|
Delete("/groups/{GroupId}");
|
|
Permissions("im:group:manage");
|
|
}
|
|
|
|
public override async Task HandleAsync(DeleteGroupEndpointRequest req, CancellationToken ct)
|
|
{
|
|
var userId = userContext.GetRequiredUserGuid();
|
|
await mediator.Send(new DeleteGroupCommand(req.GroupId, userId), ct);
|
|
HttpContext.Response.StatusCode = 204;
|
|
}
|
|
}
|