20 lines
622 B
C#
20 lines
622 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using PlotLine.Services;
|
|
|
|
namespace PlotLine.Controllers;
|
|
|
|
public sealed class AnalyticsController(IAnalyticsService analytics) : Controller
|
|
{
|
|
public async Task<IActionResult> Index(
|
|
int projectId,
|
|
int? bookId,
|
|
decimal? startChapterNumber,
|
|
decimal? endChapterNumber,
|
|
decimal? startSceneNumber,
|
|
decimal? endSceneNumber)
|
|
{
|
|
var model = await analytics.GetStoryHealthAsync(projectId, bookId, startChapterNumber, endChapterNumber, startSceneNumber, endSceneNumber);
|
|
return model is null ? NotFound() : View(model);
|
|
}
|
|
}
|