PlotDirector/PlotLine/Controllers/HelpDiagnosticsController.cs
2026-06-06 20:36:54 +01:00

26 lines
679 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using PlotLine.Services;
using PlotLine.ViewModels;
namespace PlotLine.Controllers;
[Authorize]
public sealed class HelpDiagnosticsController(IHelpService help) : Controller
{
public IActionResult Index()
{
return View(new HelpDiagnosticsViewModel
{
Articles = help.GetAllArticles(),
Coverage = help.GetCoverage()
});
}
public IActionResult Article(string path)
{
var article = help.GetByRelativePath(path);
return article is null ? NotFound() : View(new HelpArticleDiagnosticViewModel { Article = article });
}
}