aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application/Management/API/Controllers
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-06-22 09:58:10 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-06-22 09:58:10 -0500
commitd170ab0f1ba323b55001c0bfa5a0eef23c30551f (patch)
treedf6b7600e96139aa0c6bee42a9921da71909f704 /src/slskd/Application/Management/API/Controllers
parentad6e6cc996c1cf2d42d063443b4dc4efa6048e2f (diff)
downloadslskd-d170ab0f1ba323b55001c0bfa5a0eef23c30551f.tar.gz
docs
Diffstat (limited to 'src/slskd/Application/Management/API/Controllers')
-rw-r--r--src/slskd/Application/Management/API/Controllers/ServerController.cs11
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());