25 lines
692 B
C#
25 lines
692 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Moonlight.Api.Mappers;
|
|
using Moonlight.Api.Services;
|
|
using Moonlight.Shared.Http.Responses.Admin.Frontend;
|
|
|
|
namespace Moonlight.Api.Http.Controllers;
|
|
|
|
[ApiController]
|
|
[Route("api/frontend")]
|
|
public class FrontendController : Controller
|
|
{
|
|
private readonly FrontendService FrontendService;
|
|
|
|
public FrontendController(FrontendService frontendService)
|
|
{
|
|
FrontendService = frontendService;
|
|
}
|
|
|
|
[HttpGet("config")]
|
|
public async Task<ActionResult<FrontendConfigDto>> GetConfigAsync()
|
|
{
|
|
var configuration = await FrontendService.GetConfigurationAsync();
|
|
return FrontendConfigMapper.ToDto(configuration);
|
|
}
|
|
} |