aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-09-11 22:25:13 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-09-11 22:25:13 -0500
commite4553c18f0d5b44ec2a2c4f0fd1157161a9a867b (patch)
treebbf9dbf5842e461d5c1f8d025c7d85e9d705ed95 /src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs
parentcdef8238bd5925caf855023db4b00dc449307aa2 (diff)
downloadslskd-e4553c18f0d5b44ec2a2c4f0fd1157161a9a867b.tar.gz
migrate more methods to I/Application
Diffstat (limited to 'src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs')
-rw-r--r--src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs b/src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs
index 6868d3fb..207d2ca6 100644
--- a/src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs
+++ b/src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs
@@ -21,7 +21,6 @@ namespace slskd.Messaging.API
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
- using Soulseek;
/// <summary>
/// Server.
@@ -33,12 +32,12 @@ namespace slskd.Messaging.API
[Consumes("application/json")]
public class PublicChatController : ControllerBase
{
- public PublicChatController(ISoulseekClient client)
+ public PublicChatController(IApplication application)
{
- Client = client;
+ Application = application;
}
- private ISoulseekClient Client { get; }
+ private IApplication Application { get; }
/// <summary>
/// Starts public chat.
@@ -48,7 +47,7 @@ namespace slskd.Messaging.API
[Authorize]
public async Task<IActionResult> Start()
{
- await Client.StartPublicChatAsync();
+ await Application.StartPublicChatAsync();
return StatusCode(StatusCodes.Status201Created);
}
@@ -60,7 +59,7 @@ namespace slskd.Messaging.API
[Authorize]
public async Task<IActionResult> Stop()
{
- await Client.StopPublicChatAsync();
+ await Application.StopPublicChatAsync();
return StatusCode(StatusCodes.Status204NoContent);
}
}