This commit is contained in:
孙诚
2025-02-27 16:58:21 +08:00
commit 80ab8d76eb
40 changed files with 2482 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using Core;
using Microsoft.AspNetCore.Mvc;
namespace WebApi.Controllers;
public class XiaoController : BaseController
{
private readonly ILogger<XiaoController> _logger;
public XiaoController(ILogger<XiaoController> logger)
{
_logger = logger;
}
[HttpGet]
public async Task<string> GotoHomeGame()
{
await WxNotify.SendCommonAsync("接收到启动游戏机指令");
var commands = new[]
{
"grub-reboot 2",
"reboot"
};
_ = Task.Run(async () =>
{
await Task.Delay(3000);
_ = await Command.ExecAsync(commands);
});
return "OK";
}
}