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