diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-09-11 22:25:13 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-09-11 22:25:13 -0500 |
| commit | e4553c18f0d5b44ec2a2c4f0fd1157161a9a867b (patch) | |
| tree | bbf9dbf5842e461d5c1f8d025c7d85e9d705ed95 /src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs | |
| parent | cdef8238bd5925caf855023db4b00dc449307aa2 (diff) | |
| download | slskd-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.cs | 11 |
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); } } |
