aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-01-20 16:15:44 -0600
committerJP Dillingham <jp@dillingham.me>2023-01-20 16:15:44 -0600
commita5ca9a6c0397370ac2ea6b79be1641b9e64a4336 (patch)
tree97840729a76c2700fbfd6bf740a069aef53e8af0
parent31fb7f8baefbbfc478838137e0321b6e49ad78a2 (diff)
downloadslskd-a5ca9a6c0397370ac2ea6b79be1641b9e64a4336.tar.gz
docs, add controller connect/disconnect to route
-rw-r--r--src/slskd/Relay/API/Controllers/RelayController.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/slskd/Relay/API/Controllers/RelayController.cs b/src/slskd/Relay/API/Controllers/RelayController.cs
index f6c6d778..e3c3d28b 100644
--- a/src/slskd/Relay/API/Controllers/RelayController.cs
+++ b/src/slskd/Relay/API/Controllers/RelayController.cs
@@ -41,6 +41,12 @@ namespace slskd.Relay
[ApiController]
public class RelayController : ControllerBase
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RelayController"/> class.
+ /// </summary>
+ /// <param name="relayService"></param>
+ /// <param name="optionsMonitor"></param>
+ /// <param name="optionsAtStartup"></param>
public RelayController(
IRelayService relayService,
IOptionsMonitor<Options> optionsMonitor,
@@ -57,7 +63,11 @@ namespace slskd.Relay
private RelayMode OperationMode => OptionsAtStartup.Relay.Mode.ToEnum<RelayMode>();
private IOptionsMonitor<Options> OptionsMonitor { get; }
- [HttpPut("")]
+ /// <summary>
+ /// Connects to the configured controller.
+ /// </summary>
+ /// <returns></returns>
+ [HttpPut("controller")]
[Authorize(Policy = AuthPolicy.JwtOnly)]
public async Task<IActionResult> Connect()
{
@@ -70,7 +80,11 @@ namespace slskd.Relay
return Ok();
}
- [HttpDelete("")]
+ /// <summary>
+ /// Disconnects from the connected controller.
+ /// </summary>
+ /// <returns></returns>
+ [HttpDelete("controller")]
[Authorize(Policy = AuthPolicy.JwtOnly)]
public async Task<IActionResult> Disconnect()
{