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