16 lines
433 B
C#
16 lines
433 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using PlotLine.Services;
|
|
|
|
namespace PlotLine.Controllers;
|
|
|
|
[Authorize]
|
|
public sealed class StoryBibleController(IStoryBibleService storyBible) : Controller
|
|
{
|
|
public async Task<IActionResult> Index(int projectId, string? q)
|
|
{
|
|
var model = await storyBible.GetAsync(projectId, q);
|
|
return model is null ? NotFound() : View(model);
|
|
}
|
|
}
|