Added Debug Notes
This commit is contained in:
@@ -108,7 +108,7 @@ public class MonitoringController : Controller
|
||||
}
|
||||
|
||||
|
||||
// Endpoint, an den der Agent seine Hardwareinformationen schickt
|
||||
// Endpoint, an den der Agent seine Hardwareinformationen schickt (Registrierung Schritt 2)
|
||||
[HttpPost("hardware-info")]
|
||||
public async Task<IActionResult> Register([FromBody] HardwareDto dto)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public class MonitoringController : Controller
|
||||
return NotFound("No Matching Server found.");
|
||||
}
|
||||
|
||||
// Endpoint, an dem sich ein Agent initial registriert
|
||||
// Endpoint, an dem sich ein Agent seine ID abholt (Registrierung Schritt 1)
|
||||
[HttpGet("register")]
|
||||
public async Task<IActionResult> GetServerIdByIp([FromQuery] string IpAddress)
|
||||
{
|
||||
@@ -186,8 +186,12 @@ public class MonitoringController : Controller
|
||||
}
|
||||
|
||||
// Server in Datenbank finden
|
||||
var server = await _context.Servers
|
||||
.FirstOrDefaultAsync(s => s.Id == dto.ServerId);
|
||||
// DEBUG
|
||||
Console.WriteLine("RECEIVED ID ${ID}", dto.ServerId);
|
||||
Server? server = await _context.Servers.FirstOrDefaultAsync(s => s.Id == dto.ServerId);
|
||||
|
||||
// DEBUG
|
||||
Console.WriteLine("FOUND SERVER ${ServerName}", server.Name);
|
||||
|
||||
if (server != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user