add ability to view Migration History
This commit is contained in:
28
Oqtane.Server/Controllers/MigrationHistoryController.cs
Normal file
28
Oqtane.Server/Controllers/MigrationHistoryController.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user