|
|
@ -1,5 +1,6 @@
|
|
|
|
using Infrastructure.Data;
|
|
|
|
using Infrastructure.Data;
|
|
|
|
using Infrastructure.Extensions;
|
|
|
|
using Infrastructure.Extensions;
|
|
|
|
|
|
|
|
using Infrastructure.Web;
|
|
|
|
using IoT.Shared.Application.Domain.Entities;
|
|
|
|
using IoT.Shared.Application.Domain.Entities;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
@ -16,12 +17,14 @@ namespace Platform.Controllers
|
|
|
|
[ApiExplorerSettings(IgnoreApi = true)]
|
|
|
|
[ApiExplorerSettings(IgnoreApi = true)]
|
|
|
|
public class HomeController : Controller
|
|
|
|
public class HomeController : Controller
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
private readonly IUserService _useService;
|
|
|
|
private readonly IRepository<User> _userRepo;
|
|
|
|
private readonly IRepository<User> _userRepo;
|
|
|
|
private readonly IRepository<Organ> _organRepo;
|
|
|
|
private readonly IRepository<Organ> _organRepo;
|
|
|
|
private readonly IRepository<Building> _buildingRepo;
|
|
|
|
private readonly IRepository<Building> _buildingRepo;
|
|
|
|
|
|
|
|
|
|
|
|
public HomeController(IRepository<User> userRepo,IRepository<Organ> organRepo,IRepository<Building> buildingRepo)
|
|
|
|
public HomeController(IUserService userService,IRepository<User> userRepo,IRepository<Organ> organRepo,IRepository<Building> buildingRepo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
this._useService = userService;
|
|
|
|
this._userRepo = userRepo;
|
|
|
|
this._userRepo = userRepo;
|
|
|
|
this._organRepo = organRepo;
|
|
|
|
this._organRepo = organRepo;
|
|
|
|
this._buildingRepo = buildingRepo;
|
|
|
|
this._buildingRepo = buildingRepo;
|
|
|
@ -29,7 +32,6 @@ namespace Platform.Controllers
|
|
|
|
|
|
|
|
|
|
|
|
public IActionResult Index()
|
|
|
|
public IActionResult Index()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var organId = Guid.Parse(User.Claims.FirstOrDefault(o => o.Type == ClaimTypes.UserData).Value);
|
|
|
|
|
|
|
|
return View();
|
|
|
|
return View();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|