This repository was archived by the owner on Mar 7, 2026. It is now read-only.
forked from btcpayserver/btcpayserver-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlashPluginExtensions.cs
More file actions
60 lines (51 loc) · 2.74 KB
/
FlashPluginExtensions.cs
File metadata and controls
60 lines (51 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using BTCPayServer.Abstractions.Contracts;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Plugins.Flash
{
public static class FlashPluginExtensions
{
public static void MapFlashPluginRoutes(this IEndpointRouteBuilder endpoints)
{
// Map the dashboard routes
endpoints.MapControllerRoute(
name: "Flash-PayoutDashboard",
pattern: "plugins/flash/{storeId}/payouts/dashboard",
defaults: new { controller = "FlashPayout", action = "Dashboard" });
endpoints.MapControllerRoute(
name: "Flash-PayoutList",
pattern: "plugins/flash/{storeId}/payouts/list",
defaults: new { controller = "FlashPayout", action = "GetPayouts" });
endpoints.MapControllerRoute(
name: "Flash-PayoutExport",
pattern: "plugins/flash/{storeId}/payouts/export",
defaults: new { controller = "FlashPayout", action = "ExportPayouts" });
endpoints.MapControllerRoute(
name: "Flash-BoltcardStats",
pattern: "plugins/flash/{storeId}/payouts/boltcard-stats",
defaults: new { controller = "FlashPayout", action = "GetBoltcardStats" });
endpoints.MapControllerRoute(
name: "Flash-PayoutTimeline",
pattern: "plugins/flash/{storeId}/payouts/timeline",
defaults: new { controller = "FlashPayout", action = "GetPayoutTimeline" });
// LNURL routes for flashcard support
endpoints.MapControllerRoute(
name: "Flash-LnurlPay",
pattern: "plugins/{storeId}/Flash/.well-known/lnurlp/{cardId}",
defaults: new { controller = "FlashLNURL", action = "LnurlPay" });
endpoints.MapControllerRoute(
name: "Flash-LnurlPayCallback",
pattern: "plugins/{storeId}/Flash/lnurlp/{cardId}/callback",
defaults: new { controller = "FlashLNURL", action = "LnurlPayCallback" });
endpoints.MapControllerRoute(
name: "Flash-FlashcardLnurl",
pattern: "plugins/{storeId}/Flash/flashcard/{cardId}/lnurl",
defaults: new { controller = "FlashLNURL", action = "GetFlashcardLnurl" });
endpoints.MapControllerRoute(
name: "Flash-TestLnurl",
pattern: "plugins/{storeId}/Flash/test-lnurl",
defaults: new { controller = "FlashLNURL", action = "TestLnurl" });
}
}
}