Changed Endpoint Names
Some checks failed
Gitea CI/CD / Set Tag Name (pull_request) Successful in 6s
Gitea CI/CD / build-and-test (pull_request) Successful in 1m7s
Gitea CI/CD / docker-build-and-push (pull_request) Successful in 8m59s
Gitea CI/CD / Create Tag (pull_request) Failing after 7s

This commit is contained in:
2025-10-03 23:54:35 +02:00
parent 27792ff7f4
commit 2169b3d45f

View File

@@ -12,7 +12,7 @@ using Watcher.ViewModels;
namespace Watcher.Controllers; namespace Watcher.Controllers;
public class RegistrationDto public class HardwareDto
{ {
// Server Identity // Server Identity
[Required] [Required]
@@ -101,9 +101,9 @@ public class MonitoringController : Controller
} }
// Endpoint, an dem sich neue Agents registrieren // Endpoint, an den der Agent seine Hardwareinformationen schickt
[HttpPost("register-agent-by-id")] [HttpPost("hardware-info")]
public async Task<IActionResult> Register([FromBody] RegistrationDto dto) public async Task<IActionResult> Register([FromBody] HardwareDto dto)
{ {
// Gültigkeit des Payloads prüfen // Gültigkeit des Payloads prüfen
if (!ModelState.IsValid) if (!ModelState.IsValid)
@@ -140,7 +140,8 @@ public class MonitoringController : Controller
return NotFound("No Matching Server found."); return NotFound("No Matching Server found.");
} }
[HttpGet("server-id-by-ip")] // Endpoint, an dem sich ein Agent initial registriert
[HttpGet("register")]
public async Task<IActionResult> GetServerIdByIp([FromQuery] string IpAddress) public async Task<IActionResult> GetServerIdByIp([FromQuery] string IpAddress)
{ {
var server = await _context.Servers var server = await _context.Servers