diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-09-08 09:14:06 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-09-08 09:14:06 -0500 |
| commit | d72995333092c7bc31528b23d770024034957137 (patch) | |
| tree | 020bb44b4bdd48ef0ed220cc22e767c98d755f95 /src/slskd/Application/Management/API/Controllers | |
| parent | 4407fadc62b4edbe51854aa94b74b990b88e8316 (diff) | |
| download | slskd-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.cs | 6 |
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; |
