using Microsoft.AspNetCore.Mvc;
namespace Bootstrap.Client.Controllers
{
///
/// 运维管理接口
///
[Route("api/[controller]")]
[ApiController]
public class AdminController : ControllerBase
{
///
/// 更改系统运行模式 1 为演示模式 0 为正常模式
///
[HttpGet]
public bool Get([FromQuery]string authCode, string salt, int model)
{
var ret = false;
// 检查授权
if (Longbow.Security.Cryptography.LgbCryptography.ComputeHash(authCode, salt) == "3lpCnRu7qqiAbIrx7gNRUB0mPXgJC3wGoyPJED3KeoA=")
{
using (var db = Longbow.Data.DbManager.Create("ba"))
{
db.Execute("Update Dicts Set Code = @0 Where Category = @1 and Name = @2", model, "系统设置", "演示系统");
}
ret = true;
}
return ret;
}
}
}