14 lines
350 B
C#
14 lines
350 B
C#
namespace OwnChar.Server.Api.Endpoint;
|
|
|
|
internal class ApiBuilder : IApiBuilder
|
|
{
|
|
private readonly Dictionary<ApiMapInfo, Delegate> handlers = [];
|
|
|
|
public IReadOnlyDictionary<ApiMapInfo, Delegate> Handlers => handlers;
|
|
|
|
public void Map(string pattern, Delegate action)
|
|
{
|
|
handlers.Add(new(pattern, "POST"), action);
|
|
}
|
|
}
|