mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-24 22:58:28 +01:00
21 lines
581 B
C#
21 lines
581 B
C#
|
using Microsoft.AspNetCore.Builder;
|
|||
|
using Microsoft.Extensions.DependencyInjection;
|
|||
|
|
|||
|
namespace BTCPayServer.Controllers;
|
|||
|
|
|||
|
public static class BTCPayAppExtensions
|
|||
|
{
|
|||
|
public static IServiceCollection AddBTCPayApp(this IServiceCollection serviceCollection)
|
|||
|
{
|
|||
|
serviceCollection.AddSingleton<BtcPayAppService>();
|
|||
|
return serviceCollection;
|
|||
|
}
|
|||
|
|
|||
|
public static void UseBTCPayApp(this IApplicationBuilder builder)
|
|||
|
{
|
|||
|
builder.UseEndpoints(routeBuilder =>
|
|||
|
{
|
|||
|
routeBuilder.MapHub<BTCPayAppHub>("hub/btcpayapp");
|
|||
|
});
|
|||
|
}
|
|||
|
}
|