Refactoring: Allow ViewsRazor extension to be used by plugins

Moves the `ViewsRazor` extension into Abstractions, so that it can be used by plugins.

Separated out of #2701, prerequisite for the LNbank plugin integration.
This commit is contained in:
Dennis Reimann
2021-07-27 20:00:33 +02:00
committed by Andrew Camilleri
parent 68595be323
commit ad8f347989
31 changed files with 48 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
using System;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Services;
namespace BTCPayServer.Models.ServerViewModels
@@ -23,7 +24,7 @@ namespace BTCPayServer.Models.ServerViewModels
{
if (Settings?.LastUpdated is DateTimeOffset date)
{
return Views.ViewsRazor.ToTimeAgo(date);
return ViewsRazor.ToTimeAgo(date);
}
return null;
}