Refactored project to module structure
This commit is contained in:
23
Moonlight.Api/Shared/Frontend/FrontendController.cs
Normal file
23
Moonlight.Api/Shared/Frontend/FrontendController.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Moonlight.Shared.Shared.Frontend;
|
||||
|
||||
namespace Moonlight.Api.Shared.Frontend;
|
||||
|
||||
[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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user