From d72995333092c7bc31528b23d770024034957137 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 8 Sep 2021 09:14:06 -0500 Subject: inject IApplication and implement version check --- .../Application/Management/API/Controllers/ApplicationController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/slskd/Application/Management/API/Controllers/ApplicationController.cs') diff --git a/src/slskd/Application/Management/API/Controllers/ApplicationController.cs b/src/slskd/Application/Management/API/Controllers/ApplicationController.cs index 850dfda9..0ba8b655 100644 --- a/src/slskd/Application/Management/API/Controllers/ApplicationController.cs +++ b/src/slskd/Application/Management/API/Controllers/ApplicationController.cs @@ -34,12 +34,14 @@ namespace slskd.Management.API [Consumes("application/json")] public class ApplicationController : ControllerBase { - public ApplicationController(IManagementService managementService, IHostApplicationLifetime lifetime) + public ApplicationController(IManagementService managementService, IHostApplicationLifetime lifetime, IApplication application) { Management = managementService; Lifetime = lifetime; + Application = application; } + private IApplication Application { get; } private IManagementService Management { get; } private IHostApplicationLifetime Lifetime { get; } @@ -101,7 +103,7 @@ namespace slskd.Management.API { if (forceCheck) { - await Management.CheckVersionAsync(); + await Application.CheckVersionAsync(); } var state = Management.ApplicationState; -- cgit v1.2.3