diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-06-20 13:55:19 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-06-20 13:55:19 -0500 |
| commit | f11272fb90650215eb0cc672dc1e79834e71ecf0 (patch) | |
| tree | 32933134af4a00e44f026cfd23c93e0a4b618be0 | |
| parent | c9926bb6d2d78f2ba019e04bcff8d682001009d3 (diff) | |
| download | slskd-f11272fb90650215eb0cc672dc1e79834e71ecf0.tar.gz | |
add GET for server state
| -rw-r--r-- | src/slskd/Application/Management/API/Controllers/ServerController.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/slskd/Application/Management/API/Controllers/ServerController.cs b/src/slskd/Application/Management/API/Controllers/ServerController.cs index da4a0182..5826d36a 100644 --- a/src/slskd/Application/Management/API/Controllers/ServerController.cs +++ b/src/slskd/Application/Management/API/Controllers/ServerController.cs @@ -48,7 +48,7 @@ namespace slskd.Management.API [Authorize] public async Task<IActionResult> Connect() { - await Management.ConnectClientAsync(); + await Management.ConnectServerAsync(); return Ok(); } @@ -61,8 +61,15 @@ namespace slskd.Management.API [Authorize] public IActionResult Disconnect([FromBody] string message) { - Management.DisconnectClient(message); + Management.DisconnectServer(message); return NoContent(); } + + [HttpGet] + [Authorize] + public IActionResult Get() + { + return Ok(Management.GetServerState()); + } } }
\ No newline at end of file |
