diff --git a/Moonlight.ApiServer/Http/Controllers/Assets/AssetsController.cs b/Moonlight.ApiServer/Http/Controllers/Assets/AssetsController.cs deleted file mode 100644 index df32f208..00000000 --- a/Moonlight.ApiServer/Http/Controllers/Assets/AssetsController.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Moonlight.ApiServer.Services; -using Moonlight.Shared.Http.Responses.Assets; - -namespace Moonlight.ApiServer.Http.Controllers.Assets; - -[ApiController] -[Route("api/assets")] -public class AssetsController : Controller -{ - private readonly AssetService AssetService; - - public AssetsController(AssetService assetService) - { - AssetService = assetService; - } - - [HttpGet] - public async Task Get() - { - return new FrontendAssetResponse() - { - JavascriptFiles = AssetService.GetJavascriptAssets(), - }; - } -} \ No newline at end of file diff --git a/Moonlight.ApiServer/Http/Controllers/Assets/AssetsPluginsController.cs b/Moonlight.ApiServer/Http/Controllers/Assets/AssetsPluginsController.cs deleted file mode 100644 index de90a1a0..00000000 --- a/Moonlight.ApiServer/Http/Controllers/Assets/AssetsPluginsController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using MoonCore.Exceptions; -using MoonCore.Models; -using Moonlight.ApiServer.Services; - -namespace Moonlight.ApiServer.Http.Controllers.Assets; - -[ApiController] -[Route("api/assets/plugins")] -public class AssetsPluginsController : Controller -{ - private readonly PluginService PluginService; - - public AssetsPluginsController(PluginService pluginService) - { - PluginService = pluginService; - } - - [HttpGet] - public Task GetManifest() - { - return Task.FromResult(PluginService.HostedPluginsManifest); - } - - [HttpGet("stream")] - public async Task GetAssembly([FromQuery(Name = "assembly")] string assembly) - { - var assembliesMap = PluginService.ClientAssemblyMap; - - if (assembliesMap.ContainsKey(assembly)) - throw new HttpApiException("The requested assembly could not be found", 404); - - var path = assembliesMap[assembly]; - - await Results.File(path).ExecuteAsync(HttpContext); - } -} \ No newline at end of file diff --git a/Moonlight.ApiServer/Http/Controllers/FrontendController.cs b/Moonlight.ApiServer/Http/Controllers/FrontendController.cs index fb53d9ed..b9bd76d1 100644 --- a/Moonlight.ApiServer/Http/Controllers/FrontendController.cs +++ b/Moonlight.ApiServer/Http/Controllers/FrontendController.cs @@ -42,7 +42,7 @@ public class FrontendController : Controller return configuration; } - [HttpGet("plugins/{assemblyName}")] + [HttpGet("plugins/{assemblyName}")] // TODO: Test this public async Task GetPluginAssembly(string assemblyName) { var assembliesMap = PluginService.ClientAssemblyMap; diff --git a/Moonlight.ApiServer/Moonlight.ApiServer.csproj b/Moonlight.ApiServer/Moonlight.ApiServer.csproj index 92e6e958..5c523110 100644 --- a/Moonlight.ApiServer/Moonlight.ApiServer.csproj +++ b/Moonlight.ApiServer/Moonlight.ApiServer.csproj @@ -39,7 +39,6 @@ - diff --git a/Moonlight.Client/Moonlight.Client.csproj b/Moonlight.Client/Moonlight.Client.csproj index 76868a2b..6ce46174 100644 --- a/Moonlight.Client/Moonlight.Client.csproj +++ b/Moonlight.Client/Moonlight.Client.csproj @@ -27,7 +27,7 @@ - +