From 936ed099a6e5258f9fd5a5ac026afc0630359b98 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 13 Feb 2021 07:58:15 -0600 Subject: move controllers and DTOs to API namespace --- src/slskd/Controllers/PublicChatController.cs | 50 --------------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/slskd/Controllers/PublicChatController.cs (limited to 'src/slskd/Controllers/PublicChatController.cs') diff --git a/src/slskd/Controllers/PublicChatController.cs b/src/slskd/Controllers/PublicChatController.cs deleted file mode 100644 index 10ad9234..00000000 --- a/src/slskd/Controllers/PublicChatController.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace slskd.Controllers -{ - using Microsoft.AspNetCore.Authorization; - using Microsoft.AspNetCore.Http; - using Microsoft.AspNetCore.Mvc; - using Soulseek; - using System.Threading.Tasks; - - /// - /// Server - /// - [Route("api/v{version:apiVersion}/[controller]")] - [ApiVersion("0")] - [ApiController] - [Produces("application/json")] - [Consumes("application/json")] - public class PublicChatController : ControllerBase - { - private ISoulseekClient Client { get; } - - public PublicChatController(ISoulseekClient client) - { - Client = client; - } - - /// - /// Starts public chat. - /// - /// - [HttpPost] - [Authorize] - public async Task Start() - { - await Client.StartPublicChatAsync(); - return StatusCode(StatusCodes.Status201Created); - } - - /// - /// Stops public chat. - /// - /// - [HttpDelete] - [Authorize] - public async Task Stop() - { - await Client.StopPublicChatAsync(); - return StatusCode(StatusCodes.Status204NoContent); - } - } -} -- cgit v1.2.3