From 28f26004c48b8fa2776bacd86224f028240e2454 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Mon, 27 May 2024 11:34:40 +0200 Subject: [PATCH] Move app models --- BTCPayApp.CommonServer/IBTCPayAppHubClient.cs | 1 + BTCPayApp.CommonServer/{ => Models}/AccessTokenResult.cs | 2 +- BTCPayApp.CommonServer/{ => Models}/AppInstanceInfo.cs | 2 +- BTCPayApp.CommonServer/{ => Models}/AppUserInfo.cs | 2 +- BTCPayApp.CommonServer/{ => Models}/SignupRequest.cs | 2 +- BTCPayApp.CommonServer/{ => Models}/SignupResult.cs | 2 +- BTCPayServer/App/API/AppApiController.Account.cs | 1 + BTCPayServer/App/API/AppApiController.cs | 3 ++- BTCPayServer/App/BTCPayAppHub.cs | 1 + BTCPayServer/App/BTCPayAppState.cs | 1 + BTCPayServer/App/LN.cs | 2 +- 11 files changed, 12 insertions(+), 7 deletions(-) rename BTCPayApp.CommonServer/{ => Models}/AccessTokenResult.cs (87%) rename BTCPayApp.CommonServer/{ => Models}/AppInstanceInfo.cs (89%) rename BTCPayApp.CommonServer/{ => Models}/AppUserInfo.cs (97%) rename BTCPayApp.CommonServer/{ => Models}/SignupRequest.cs (82%) rename BTCPayApp.CommonServer/{ => Models}/SignupResult.cs (80%) diff --git a/BTCPayApp.CommonServer/IBTCPayAppHubClient.cs b/BTCPayApp.CommonServer/IBTCPayAppHubClient.cs index b0001d830..12293740f 100644 --- a/BTCPayApp.CommonServer/IBTCPayAppHubClient.cs +++ b/BTCPayApp.CommonServer/IBTCPayAppHubClient.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using BTCPayServer.Client.Models; using BTCPayServer.Lightning; using NBitcoin; +using LightningPayment = BTCPayApp.CommonServer.Models.LightningPayment; namespace BTCPayApp.CommonServer; diff --git a/BTCPayApp.CommonServer/AccessTokenResult.cs b/BTCPayApp.CommonServer/Models/AccessTokenResult.cs similarity index 87% rename from BTCPayApp.CommonServer/AccessTokenResult.cs rename to BTCPayApp.CommonServer/Models/AccessTokenResult.cs index d54a170aa..926f19bfa 100644 --- a/BTCPayApp.CommonServer/AccessTokenResult.cs +++ b/BTCPayApp.CommonServer/Models/AccessTokenResult.cs @@ -1,6 +1,6 @@ using System; -namespace BTCPayApp.CommonServer; +namespace BTCPayApp.CommonServer.Models; public class AccessTokenResult(string accessToken, string refreshToken, DateTimeOffset expiry) { diff --git a/BTCPayApp.CommonServer/AppInstanceInfo.cs b/BTCPayApp.CommonServer/Models/AppInstanceInfo.cs similarity index 89% rename from BTCPayApp.CommonServer/AppInstanceInfo.cs rename to BTCPayApp.CommonServer/Models/AppInstanceInfo.cs index f9db7c444..e6663f56b 100644 --- a/BTCPayApp.CommonServer/AppInstanceInfo.cs +++ b/BTCPayApp.CommonServer/Models/AppInstanceInfo.cs @@ -1,4 +1,4 @@ -namespace BTCPayApp.CommonServer; +namespace BTCPayApp.CommonServer.Models; public class AppInstanceInfo { diff --git a/BTCPayApp.CommonServer/AppUserInfo.cs b/BTCPayApp.CommonServer/Models/AppUserInfo.cs similarity index 97% rename from BTCPayApp.CommonServer/AppUserInfo.cs rename to BTCPayApp.CommonServer/Models/AppUserInfo.cs index 1de28514f..cae16d7b5 100644 --- a/BTCPayApp.CommonServer/AppUserInfo.cs +++ b/BTCPayApp.CommonServer/Models/AppUserInfo.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using BTCPayServer.Lightning; -namespace BTCPayApp.CommonServer; +namespace BTCPayApp.CommonServer.Models; public partial class LightningPayment { diff --git a/BTCPayApp.CommonServer/SignupRequest.cs b/BTCPayApp.CommonServer/Models/SignupRequest.cs similarity index 82% rename from BTCPayApp.CommonServer/SignupRequest.cs rename to BTCPayApp.CommonServer/Models/SignupRequest.cs index 241d91690..ddb83e15f 100644 --- a/BTCPayApp.CommonServer/SignupRequest.cs +++ b/BTCPayApp.CommonServer/Models/SignupRequest.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace BTCPayApp.CommonServer; +namespace BTCPayApp.CommonServer.Models; public class SignupRequest { diff --git a/BTCPayApp.CommonServer/SignupResult.cs b/BTCPayApp.CommonServer/Models/SignupResult.cs similarity index 80% rename from BTCPayApp.CommonServer/SignupResult.cs rename to BTCPayApp.CommonServer/Models/SignupResult.cs index 174dbc067..5f37a7c48 100644 --- a/BTCPayApp.CommonServer/SignupResult.cs +++ b/BTCPayApp.CommonServer/Models/SignupResult.cs @@ -1,4 +1,4 @@ -namespace BTCPayApp.CommonServer; +namespace BTCPayApp.CommonServer.Models; public class SignupResult { diff --git a/BTCPayServer/App/API/AppApiController.Account.cs b/BTCPayServer/App/API/AppApiController.Account.cs index 69cbde1bf..8a3763549 100644 --- a/BTCPayServer/App/API/AppApiController.Account.cs +++ b/BTCPayServer/App/API/AppApiController.Account.cs @@ -3,6 +3,7 @@ using System; using System.Linq; using System.Threading.Tasks; using BTCPayApp.CommonServer; +using BTCPayApp.CommonServer.Models; using BTCPayServer.Abstractions.Constants; using BTCPayServer.Abstractions.Contracts; using BTCPayServer.Abstractions.Extensions; diff --git a/BTCPayServer/App/API/AppApiController.cs b/BTCPayServer/App/API/AppApiController.cs index 25791d3d9..ae820798b 100644 --- a/BTCPayServer/App/API/AppApiController.cs +++ b/BTCPayServer/App/API/AppApiController.cs @@ -1,7 +1,8 @@ -#nullable enable +#nullable enable using System; using System.Threading.Tasks; using BTCPayApp.CommonServer; +using BTCPayApp.CommonServer.Models; using BTCPayServer.Abstractions.Constants; using BTCPayServer.Abstractions.Contracts; using BTCPayServer.Abstractions.Extensions; diff --git a/BTCPayServer/App/BTCPayAppHub.cs b/BTCPayServer/App/BTCPayAppHub.cs index 692679d0c..b6a6f4f3c 100644 --- a/BTCPayServer/App/BTCPayAppHub.cs +++ b/BTCPayServer/App/BTCPayAppHub.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using BTCPayApp.CommonServer; +using BTCPayApp.CommonServer.Models; using BTCPayServer.Abstractions.Constants; using BTCPayServer.HostedServices; using BTCPayServer.Services; diff --git a/BTCPayServer/App/BTCPayAppState.cs b/BTCPayServer/App/BTCPayAppState.cs index e7a874641..705563332 100644 --- a/BTCPayServer/App/BTCPayAppState.cs +++ b/BTCPayServer/App/BTCPayAppState.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom.Events; using BTCPayApp.CommonServer; +using BTCPayApp.CommonServer.Models; using BTCPayServer.Events; using BTCPayServer.Payments.Lightning; using BTCPayServer.Services.Invoices; diff --git a/BTCPayServer/App/LN.cs b/BTCPayServer/App/LN.cs index 19ee263a9..2387a5def 100644 --- a/BTCPayServer/App/LN.cs +++ b/BTCPayServer/App/LN.cs @@ -10,7 +10,7 @@ using BTCPayServer.Controllers; using BTCPayServer.Lightning; using Microsoft.AspNetCore.SignalR; using NBitcoin; -using LightningPayment = BTCPayApp.CommonServer.LightningPayment; +using LightningPayment = BTCPayApp.CommonServer.Models.LightningPayment; namespace BTCPayServer.App;