diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-06-22 09:58:10 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-06-22 09:58:10 -0500 |
| commit | d170ab0f1ba323b55001c0bfa5a0eef23c30551f (patch) | |
| tree | df6b7600e96139aa0c6bee42a9921da71909f704 /src/slskd/Application/Management/API/Controllers/ServerController.cs | |
| parent | ad6e6cc996c1cf2d42d063443b4dc4efa6048e2f (diff) | |
| download | slskd-d170ab0f1ba323b55001c0bfa5a0eef23c30551f.tar.gz | |
docs
Diffstat (limited to 'src/slskd/Application/Management/API/Controllers/ServerController.cs')
| -rw-r--r-- | src/slskd/Application/Management/API/Controllers/ServerController.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/slskd/Application/Management/API/Controllers/ServerController.cs b/src/slskd/Application/Management/API/Controllers/ServerController.cs index 0fc18e9e..6468063c 100644 --- a/src/slskd/Application/Management/API/Controllers/ServerController.cs +++ b/src/slskd/Application/Management/API/Controllers/ServerController.cs @@ -42,10 +42,12 @@ namespace slskd.Management.API /// <summary> /// Connects the client. /// </summary> - /// <param name="req"></param> /// <returns></returns> [HttpPut] + [Route("")] [Authorize] + [ProducesResponseType(200)] + [ProducesResponseType(403)] public async Task<IActionResult> Connect() { if (!Management.GetServerState().IsConnected) @@ -62,7 +64,10 @@ namespace slskd.Management.API /// <param name="message"></param> /// <returns></returns> [HttpDelete] + [Route("")] [Authorize] + [ProducesResponseType(204)] + [ProducesResponseType(403)] public IActionResult Disconnect([FromBody] string message) { if (Management.GetServerState().IsConnected) @@ -77,8 +82,12 @@ namespace slskd.Management.API /// Retrieves the current state of the server. /// </summary> /// <returns></returns> + /// <response code="200"></response> [HttpGet] + [Route("")] [Authorize] + [ProducesResponseType(typeof(ServerState), 200)] + [ProducesResponseType(403)] public IActionResult Get() { return Ok(Management.GetServerState()); |
