Changed Endpoint Names
Some checks failed
Some checks failed
This commit is contained in:
@@ -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<IActionResult> Register([FromBody] RegistrationDto dto)
|
||||
// Endpoint, an den der Agent seine Hardwareinformationen schickt
|
||||
[HttpPost("hardware-info")]
|
||||
public async Task<IActionResult> 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<IActionResult> GetServerIdByIp([FromQuery] string IpAddress)
|
||||
{
|
||||
var server = await _context.Servers
|
||||
|
Reference in New Issue
Block a user