Переименовал метод

This commit is contained in:
2026-08-09 04:14:45 +03:00
parent 02059ac869
commit e474fb98c8
@@ -9,7 +9,7 @@ namespace MonitorPanel.API.Controllers;
[Route("[controller]")] [Route("[controller]")]
public class ServerController(IServerService serverService) : ControllerBase public class ServerController(IServerService serverService) : ControllerBase
{ {
[HttpGet] [HttpGet("all")]
public async Task<ActionResult<List<ServerDto>>> GetAllServers(CancellationToken cancellationToken = default) public async Task<ActionResult<List<ServerDto>>> GetAllServers(CancellationToken cancellationToken = default)
{ {
var servers = await serverService.GetAllServersAsync(cancellationToken); var servers = await serverService.GetAllServersAsync(cancellationToken);
@@ -51,7 +51,7 @@ public class ServerController(IServerService serverService) : ControllerBase
return CreatedAtAction(nameof(GetServerById), new { id }, server); return CreatedAtAction(nameof(GetServerById), new { id }, server);
} }
[HttpPut("{id}")] [HttpPatch("{id}")]
public async Task<IActionResult> UpdateServer(Guid id, ServerDto dto, CancellationToken cancellationToken = default) public async Task<IActionResult> UpdateServer(Guid id, ServerDto dto, CancellationToken cancellationToken = default)
{ {
var updatedId = await serverService.UpdateServerAsync(id, dto.Name, dto.IsHttps, dto.Address, dto.Path, dto.Port, cancellationToken); var updatedId = await serverService.UpdateServerAsync(id, dto.Name, dto.IsHttps, dto.Address, dto.Path, dto.Port, cancellationToken);