28 lines
918 B
C#
28 lines
918 B
C#
|
|
using Microsoft.AspNetCore.Builder;
|
||
|
|
using Microsoft.AspNetCore.Http;
|
||
|
|
using Microsoft.AspNetCore.Routing;
|
||
|
|
using Microsoft.Extensions.Configuration;
|
||
|
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
|
using TeamUp.SharedKernel.Modularity;
|
||
|
|
|
||
|
|
namespace TeamUp.Modules.OrgBoard;
|
||
|
|
|
||
|
|
/// <summary>Org, products, teams, seats, and the task/board model (M1).</summary>
|
||
|
|
public sealed class OrgBoardModule : IModule
|
||
|
|
{
|
||
|
|
public string Name => "orgboard";
|
||
|
|
|
||
|
|
public void Register(IServiceCollection services, IConfiguration configuration)
|
||
|
|
{
|
||
|
|
// Skeleton: no services yet. M1 introduces this module's (internal) DbContext,
|
||
|
|
// FluentValidation validators, and domain services here.
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MapEndpoints(IEndpointRouteBuilder endpoints)
|
||
|
|
{
|
||
|
|
endpoints.MapGroup($"/api/{Name}")
|
||
|
|
.WithTags("OrgBoard")
|
||
|
|
.MapGet("/ping", () => TypedResults.Ok(new ModulePing(Name)));
|
||
|
|
}
|
||
|
|
}
|