using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using PSTW_CentralSystem.DBContext; using PSTW_CentralSystem.Models; using System.Diagnostics; namespace PSTW_CentralSystem.Controllers.API { [ApiController] [Route("[controller]")] public class AdminAPI : Controller { private readonly ILogger _logger; private readonly AuthDBContext _authDbContext; public AdminAPI(ILogger logger, AuthDBContext authDbContext) { _logger = logger; _authDbContext = authDbContext; } [HttpPost("GetModuleInformation")] public async Task GetModuleInformation() { var qcList = await _authDbContext.ModuleSettings.ToListAsync(); return Json(qcList); } } }