Use new front-end based on Dashmin template

This commit is contained in:
Tech Garage 2024-01-25 20:40:43 +03:30
parent c118242c5b
commit dbd7fafb34
4391 changed files with 228401 additions and 73494 deletions

View file

@ -1,22 +1,19 @@
using MTWireGuard.Pages;
using MTWireGuard.Application.Repositories;
using MTWireGuard.Application.Repositories;
using MTWireGuard.Pages;
using Razor.Templating.Core;
using System.Globalization;
namespace MTWireGuard.Middlewares
{
public class DependencyCheckMiddleware
{
private readonly RequestDelegate _next;
private readonly IMikrotikRepository API;
public DependencyCheckMiddleware(RequestDelegate next, IMikrotikRepository mikrotik)
public DependencyCheckMiddleware(RequestDelegate next)
{
_next = next;
API = mikrotik;
}
public async Task InvokeAsync(HttpContext context)
public async Task InvokeAsync(HttpContext context, IMikrotikRepository API)
{
bool Error = false;
@ -26,7 +23,7 @@ namespace MTWireGuard.Middlewares
string? PUBLICIP = Environment.GetEnvironmentVariable("MT_PUBLIC_IP");
ErrorModel errorModel = new();
Dictionary<string, object> ViewBag = new();
Dictionary<string, object> ViewBag = [];
if (string.IsNullOrEmpty(IP) || string.IsNullOrEmpty(USER) || string.IsNullOrEmpty(PUBLICIP))
{