Database Update + Local Storage Start
Some checks failed
Gitea CI/CD / dotnet-build-and-test (push) Has been cancelled
Gitea CI/CD / Set Tag Name (push) Has been cancelled
Gitea CI/CD / docker-build-and-push (push) Has been cancelled
Gitea CI/CD / Create Tag (push) Has been cancelled

This commit is contained in:
2025-12-06 12:47:28 +01:00
parent e72bc48cc4
commit 24538d8030
7 changed files with 134 additions and 16 deletions

View File

@@ -1,10 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using System.Text.Json;
using watcher_monitoring.Payloads;
using watcher_monitoring.Data;
using watcher_monitoring.Models;
namespace watcher_monitoring.Controllers;
@@ -55,6 +53,19 @@ public class MonitoringController : Controller
_logger.LogError("Invalid hardware configuration");
return BadRequest(new { error = "Invalid Hardware Configuration Payload", details = errors });
}
try
{
// Find Server in Database
Server server = await _context.Servers.FindAsync(dto.Id);
// Add Hardware Configuration
}
catch (Exception ex)
{
_logger.LogError(ex.Message);
}
return Ok();
}