Модуль связей и Klipy

This commit is contained in:
Халимов Рустам
2026-03-27 01:22:20 +03:00
parent 7ef73b414c
commit b399649cfd
31 changed files with 603 additions and 472 deletions

View File

@@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Mvc;
using Host.Application.Admin.Commands.TestKlipy;
namespace Knot.Host.Presentation.Endpoints;
@@ -33,6 +34,12 @@ public sealed class AdminEndpoints : ICarterModule
return Results.Ok(result.Value);
});
group.MapPost("settings/test-klipy", async (ISender sender, CancellationToken ct) =>
{
var result = await sender.Send(new TestKlipyConnectionCommand(), ct);
return result.IsSuccess ? Results.Ok(new { success = true }) : Results.BadRequest(new { error = result.Error.Description });
});
group.MapGet("dashboard", async (ISender sender, CancellationToken ct) =>
{
var result = await sender.Send(new GetDashboardStatsQuery(), ct);