using System.Diagnostics;
using bitforum.Models;
using bitforum.Models.Page.Faq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;

namespace bitforum.Controllers.Page
{
    [Authorize]
    [Route("Page")]
    public class CategoryController : Controller
    {
        private readonly ILogger<CategoryController> _logger;
        private readonly DefaultDbContext _db;

        public CategoryController(ILogger<CategoryController> logger, DefaultDbContext db)
        {
            _logger = logger;
            _db = db;
        }

        [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }

        [HttpGet("Faq")]
        public IActionResult Index()
        {

            return View();
        }

        [HttpGet("Faq/Write")]
        public IActionResult Write()
        {
            return View("~/Views/Page/Document/Write.cshtml");
        }

        /*
        [HttpPost("Faq/Create")]
        public async Task<IActionResult> Create(FaqCategory request)
        {
        }

        [HttpGet("Faq/Edit/{id}")]
        public async Task<IActionResult> Edit(int id)
        {
        }

        [HttpPost("Faq/Update")]
        public async Task<IActionResult> Update(FaqCategory request)
        {
        }

        [HttpGet("Faq/Delete/{id}")]
        public async Task<IActionResult> Delete(int id)
        {
        }
        */
    }
}
