aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application/Management/API/Controllers
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-09-08 09:14:06 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-09-08 09:14:06 -0500
commitd72995333092c7bc31528b23d770024034957137 (patch)
tree020bb44b4bdd48ef0ed220cc22e767c98d755f95 /src/slskd/Application/Management/API/Controllers
parent4407fadc62b4edbe51854aa94b74b990b88e8316 (diff)
downloadslskd-d72995333092c7bc31528b23d770024034957137.tar.gz
inject IApplication and implement version check
Diffstat (limited to 'src/slskd/Application/Management/API/Controllers')
-rw-r--r--src/slskd/Application/Management/API/Controllers/ApplicationController.cs6
1 files changed, 4 insertions, 2 deletions
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;