|
6 | 6 | using Certify.Models; |
7 | 7 | using Certify.Models.Config; |
8 | 8 | using Certify.Models.Config.Migration; |
| 9 | +using Certify.Models.Hub; |
9 | 10 | using Certify.Shared; |
10 | 11 |
|
11 | 12 | namespace Certify.Service.Controllers |
@@ -38,15 +39,6 @@ public async Task<UpdateCheck> PerformUpdateCheck() |
38 | 39 | return await new Management.Util().CheckForUpdates(); |
39 | 40 | } |
40 | 41 |
|
41 | | - [HttpGet, Route("maintenance")] |
42 | | - public async Task<string> PerformMaintenanceTasks() |
43 | | - { |
44 | | - DebugLog(); |
45 | | - |
46 | | - await _certifyManager.PerformCertificateCleanup(); |
47 | | - return "OK"; |
48 | | - } |
49 | | - |
50 | 42 | [HttpGet, Route("diagnostics")] |
51 | 43 | public async Task<List<Models.Config.ActionResult>> PerformServiceDiagnostics() |
52 | 44 | { |
@@ -105,5 +97,17 @@ public async Task<List<ActionStep>> TestDataStore(DataStoreConnection dataStore) |
105 | 97 |
|
106 | 98 | [HttpPost, Route("datastores/delete")] |
107 | 99 | public async Task<List<ActionStep>> RemoveDataStore(string dataStoreId) => await _certifyManager.RemoveDataStoreConnection(dataStoreId); |
| 100 | + |
| 101 | + [HttpPost, Route("hub/join")] |
| 102 | + public async Task<Models.Config.ActionResult> JoinManagementHub(HubJoiningClientSecret joiningClientSecret) => await _certifyManager.JoinManagementHub(joiningClientSecret.Url, new ClientSecret { ClientId = joiningClientSecret.ClientId, Secret = joiningClientSecret.Secret }); |
| 103 | + |
| 104 | + [HttpPost, Route("hub/checkcreds")] |
| 105 | + public async Task<Models.Config.ActionResult> CheckManagementHubCredentials(HubJoiningClientSecret joiningClientSecret) => await _certifyManager.CheckManagementHubCredentials(joiningClientSecret.Url, new ClientSecret { ClientId = joiningClientSecret.ClientId, Secret = joiningClientSecret.Secret }); |
| 106 | + |
| 107 | + [HttpGet, Route("hub/status")] |
| 108 | + public async Task<Models.Config.ActionResult> CheckManagementHubConnectionStatus() => await _certifyManager.CheckManagementHubConnectionStatus(); |
| 109 | + |
| 110 | + [HttpGet, Route("hub/info")] |
| 111 | + public async Task<HubInfo> GetHubInfo() => await _certifyManager.GetHubInfo(); |
108 | 112 | } |
109 | 113 | } |
0 commit comments