From e4553c18f0d5b44ec2a2c4f0fd1157161a9a867b Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 11 Sep 2021 22:25:13 -0500 Subject: migrate more methods to I/Application --- .../Messaging/API/Controllers/PublicChatController.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/slskd/Application/Messaging/API/Controllers/PublicChatController.cs') 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; /// /// 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; } /// /// Starts public chat. @@ -48,7 +47,7 @@ namespace slskd.Messaging.API [Authorize] public async Task Start() { - await Client.StartPublicChatAsync(); + await Application.StartPublicChatAsync(); return StatusCode(StatusCodes.Status201Created); } @@ -60,7 +59,7 @@ namespace slskd.Messaging.API [Authorize] public async Task Stop() { - await Client.StopPublicChatAsync(); + await Application.StopPublicChatAsync(); return StatusCode(StatusCodes.Status204NoContent); } } -- cgit v1.2.3