forked from adam/discord-bot-shtik
29 lines
842 B
C#
29 lines
842 B
C#
using System.Diagnostics;
|
|
using System.Text;
|
|
using Newtonsoft.Json;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using vassago;
|
|
using vassago.Behavior;
|
|
using vassago.Models;
|
|
using vassago.WebInterface.Models;
|
|
|
|
namespace vassago.WebInterface.Controllers;
|
|
|
|
public class ConfigurationController() : Controller
|
|
{
|
|
private static Rememberer r = Rememberer.Instance;
|
|
public IActionResult Index()
|
|
{
|
|
var conf = r.Configuration() ?? new Configuration();
|
|
ViewData.Add("Serialized", JsonConvert.SerializeObject(conf));
|
|
return View(conf);
|
|
}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult Error()
|
|
{
|
|
return View(new ErrorPageViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
}
|
|
}
|