add ability to view Migration History

This commit is contained in:
sbwalker
2025-09-19 14:59:58 -04:00
parent 05b37080c1
commit beb4919d97
9 changed files with 346 additions and 204 deletions

View File

@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Oqtane.Models;
using System.Collections.Generic;
using Oqtane.Shared;
using Oqtane.Repository;
namespace Oqtane.Controllers
{
[Route(ControllerRoutes.ApiRoute)]
public class MigrationHistoryController : Controller
{
private readonly IMigrationHistoryRepository _history;
public MigrationHistoryController(IMigrationHistoryRepository history)
{
_history = history;
}
// GET: api/<controller>
[HttpGet]
[Authorize(Roles = RoleNames.Host)]
public IEnumerable<MigrationHistory> Get()
{
return _history.GetMigrationHistory();
}
}
}