28 lines
838 B
C#
28 lines
838 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using PSTW_CentralSystem.DBContext;
|
|
namespace PSTW_CentralSystem.Controllers.API
|
|
{
|
|
[ApiController]
|
|
[Route("[controller]")]
|
|
|
|
public class IdentityAPI : Controller
|
|
{
|
|
private readonly ILogger<HomeController> _logger;
|
|
private readonly IdentityDBContext _authDbContext;
|
|
|
|
public IdentityAPI(ILogger<HomeController> logger, IdentityDBContext authDbContext)
|
|
{
|
|
_logger = logger;
|
|
_authDbContext = authDbContext;
|
|
}
|
|
|
|
[HttpPost("GetUserInformation/{id}")]
|
|
public async Task<IActionResult> GetModuleInformation(int id)
|
|
{
|
|
var userInfo = await _authDbContext.Users.Where(x => x.Id == id).FirstOrDefaultAsync();
|
|
return Json("userInfo");
|
|
}
|
|
}
|
|
}
|