From 8953348116c932ddc89aeb62c71c6a232e81bee2 Mon Sep 17 00:00:00 2001 From: ryzij Date: Sun, 9 Aug 2026 03:08:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=BE=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/MonitorPanel/MonitorPanel.Core/Models/Server.cs | 6 +++--- .../Repositories/ServersRepository.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Backend/MonitorPanel/MonitorPanel.Core/Models/Server.cs b/Backend/MonitorPanel/MonitorPanel.Core/Models/Server.cs index 5fbb7d2..90084f3 100644 --- a/Backend/MonitorPanel/MonitorPanel.Core/Models/Server.cs +++ b/Backend/MonitorPanel/MonitorPanel.Core/Models/Server.cs @@ -3,10 +3,10 @@ namespace MonitorPanel.Core.Models; public class Server( Guid id, string name, - bool isHttps, string address, - string? path, - int port) + string? path = null, + bool isHttps = true, + int port = 443) { public readonly Guid Id = id; public string Name { get; set; } = name; diff --git a/Backend/MonitorPanel/MonitorPanel.DataAccess/Repositories/ServersRepository.cs b/Backend/MonitorPanel/MonitorPanel.DataAccess/Repositories/ServersRepository.cs index e7e1a64..7cf9ec2 100644 --- a/Backend/MonitorPanel/MonitorPanel.DataAccess/Repositories/ServersRepository.cs +++ b/Backend/MonitorPanel/MonitorPanel.DataAccess/Repositories/ServersRepository.cs @@ -33,14 +33,14 @@ public class ServersRepository(MonitorPanelDbContext db) : IServersRepository public async Task> GetAllServersAsync() { return await db.Servers.AsNoTracking() - .Select(s => new Server(s.Id, s.Name, s.IsHttps, s.Address, s.Path, s.Port)) + .Select(s => new Server(s.Id, s.Name, s.Address, s.Path, s.IsHttps, s.Port)) .ToListAsync(); } public async Task GetServerByIdAsync(Guid id) { var entity = await db.Servers.FirstOrDefaultAsync(s => s.Id == id); - return entity == null ? null : new Server(entity.Id, entity.Name, entity.IsHttps, entity.Address, entity.Path, entity.Port); + return entity == null ? null : new Server(entity.Id, entity.Name, entity.Address, entity.Path, entity.IsHttps, entity.Port); } public async Task UpdateServerAsync(Guid id, string name, bool isHttps, string address, string? path, int port)