28 lines
939 B
C#
28 lines
939 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.Governance;
|
||
|
|
|
||
|
|
/// <summary>Autonomy dial, the action gate, the review inbox, the audit log (M5).</summary>
|
||
|
|
public sealed class GovernanceModule : IModule
|
||
|
|
{
|
||
|
|
public string Name => "governance";
|
||
|
|
|
||
|
|
public void Register(IServiceCollection services, IConfiguration configuration)
|
||
|
|
{
|
||
|
|
// Skeleton: no services yet. M5 introduces the action gate, ReviewItem context,
|
||
|
|
// edit-distance capture, and the immutable audit log here.
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MapEndpoints(IEndpointRouteBuilder endpoints)
|
||
|
|
{
|
||
|
|
endpoints.MapGroup($"/api/{Name}")
|
||
|
|
.WithTags("Governance")
|
||
|
|
.MapGet("/ping", () => TypedResults.Ok(new ModulePing(Name)));
|
||
|
|
}
|
||
|
|
}
|