Added node server sync and delete sync. Cleaned up codebase and extracted calls to apis to services

This commit is contained in:
2025-03-02 19:24:24 +01:00
parent ef7f866ded
commit 30390dab71
25 changed files with 751 additions and 282 deletions

View File

@@ -22,9 +22,17 @@ public partial class Server
await LogToConsole("Fetching installation configuration");
// Fetching remote configuration
// Fetching remote configuration and install config
var remoteService = ServiceProvider.GetRequiredService<RemoteService>();
var installData = await remoteService.GetServerInstallation(Configuration.Id);
var serverData = await remoteService.GetServer(Configuration.Id);
// We are updating the regular server config here as well
// as changes to variables and other settings wouldn't sync otherwise
// because they won't trigger a sync
var serverConfiguration = serverData.ToServerConfiguration();
UpdateConfiguration(serverConfiguration);
var dockerImageService = ServiceProvider.GetRequiredService<DockerImageService>();