using Infrastructure.Extensions; using IoTNode.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; namespace IoTNode.Areas.Admin.Controllers { [Authorize] [Area(nameof(Admin))] public class HomeController : Controller { private readonly IoTNodeEventHandler _iotNodeEventHandler; public HomeController(IoTNodeEventHandler iotNodeEventHandler) { this._iotNodeEventHandler = iotNodeEventHandler; } public IActionResult Index() { return View(); } public IActionResult UpdateTimer() { try { this._iotNodeEventHandler.UpdateTimer(); } catch (Exception ex) { ex.PrintStack(); return Problem(ex.ToString()); } return Ok(); } public void Handle(object id) { throw new NotImplementedException(); } } }