Changed Endpoint Names
Some checks failed
Some checks failed
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user