You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
44 lines
1.0 KiB
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();
|
|
}
|
|
}
|
|
} |