mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Renaming to LndServiceViewModel, used both by grpc and rest
This commit is contained in:
@@ -491,6 +491,8 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
var result = new ServicesViewModel();
|
var result = new ServicesViewModel();
|
||||||
result.ExternalServices = _Options.ExternalServices.ToList();
|
result.ExternalServices = _Options.ExternalServices.ToList();
|
||||||
|
|
||||||
|
// other services
|
||||||
foreach (var externalService in _Options.OtherExternalServices)
|
foreach (var externalService in _Options.OtherExternalServices)
|
||||||
{
|
{
|
||||||
result.OtherExternalServices.Add(new ServicesViewModel.OtherExternalService()
|
result.OtherExternalServices.Add(new ServicesViewModel.OtherExternalService()
|
||||||
@@ -536,6 +538,7 @@ namespace BTCPayServer.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// external storage services
|
||||||
var storageSettings = await _SettingsRepository.GetSettingAsync<StorageSettings>();
|
var storageSettings = await _SettingsRepository.GetSettingAsync<StorageSettings>();
|
||||||
result.ExternalStorageServices.Add(new ServicesViewModel.OtherExternalService()
|
result.ExternalStorageServices.Add(new ServicesViewModel.OtherExternalService()
|
||||||
{
|
{
|
||||||
@@ -647,7 +650,7 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
private IActionResult LndServices(ExternalService service, ExternalConnectionString connectionString, uint? nonce)
|
private IActionResult LndServices(ExternalService service, ExternalConnectionString connectionString, uint? nonce)
|
||||||
{
|
{
|
||||||
var model = new LndGrpcServicesViewModel();
|
var model = new LndServicesViewModel();
|
||||||
if (service.Type == ExternalServiceTypes.LNDGRPC)
|
if (service.Type == ExternalServiceTypes.LNDGRPC)
|
||||||
{
|
{
|
||||||
model.Host = $"{connectionString.Server.DnsSafeHost}:{connectionString.Server.Port}";
|
model.Host = $"{connectionString.Server.DnsSafeHost}:{connectionString.Server.Port}";
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BTCPayServer.Models.ServerViewModels
|
|
||||||
{
|
|
||||||
public class LndRestServicesViewModel
|
|
||||||
{
|
|
||||||
public string BaseApiUrl { get; set; }
|
|
||||||
public string Macaroon { get; set; }
|
|
||||||
public string CertificateThumbprint { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BTCPayServer.Models.ServerViewModels
|
namespace BTCPayServer.Models.ServerViewModels
|
||||||
{
|
{
|
||||||
public class LndGrpcServicesViewModel
|
public class LndServicesViewModel
|
||||||
{
|
{
|
||||||
public string Host { get; set; }
|
public string Host { get; set; }
|
||||||
public bool SSL { get; set; }
|
public bool SSL { get; set; }
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
@model LndGrpcServicesViewModel
|
@model LndServicesViewModel
|
||||||
@{
|
@{
|
||||||
ViewData.SetActivePageAndTitle(ServerNavPages.Services);
|
ViewData.SetActivePageAndTitle(ServerNavPages.Services);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user