Improved asset service. Removed now unused plugin asset streaming endpoint

This commit is contained in:
2024-12-01 20:04:29 +01:00
parent 0a76e64d2f
commit 62fe6089f7
6 changed files with 83 additions and 54 deletions

View File

@@ -0,0 +1,27 @@
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<FrontendAssetResponse> Get()
{
return new FrontendAssetResponse()
{
CssFiles = AssetService.GetCssAssets(),
JavascriptFiles = AssetService.GetJavascriptAssets(),
};
}
}