initial commit

This commit is contained in:
2026-07-21 13:52:43 +07:00
commit f0e6f38940
881 changed files with 66309 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
using Indotalent.ConfigBackEnd.Extensions;
using Indotalent.Features.Root.Home.Cqrs;
using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer;
namespace Indotalent.Features.Root.Home;
public static class HomeEndpoint
{
public static void MapHomeEndpoints(this IEndpointRouteBuilder app)
{
var group = app.MapGroup("/dashboard").WithTags("Dashboard")
.RequireAuthorization(policy => policy.AddAuthenticationSchemes(JwtBearerDefaults.AuthenticationScheme)
.RequireAuthenticatedUser());
group.MapGet("/oms-stats", async (IMediator mediator) =>
{
var result = await mediator.Send(new GetScmDashboardQuery());
return result.ToApiResponse("Dashboard data retrieved successfully");
})
.WithName("GetOmsDashboardStats");
}
}