Added AssetService. Added command line handling for assets. Added asset streaming on the client

This commit is contained in:
2024-12-01 18:34:08 +01:00
parent 2e98d166ec
commit 0a76e64d2f
5 changed files with 134 additions and 1 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;
[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.CssFiles.ToArray(),
JavascriptFiles = AssetService.JavascriptFiles.ToArray(),
};
}
}