BootstrapAdmin/Bootstrap.Admin/Controllers/Api/SettingsController.cs

36 lines
854 B
C#
Raw Normal View History

2018-06-07 00:45:47 +08:00
using Bootstrap.DataAccess;
2018-06-07 12:25:03 +08:00
using Bootstrap.Security;
2018-06-07 00:45:47 +08:00
using Longbow.Cache;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
namespace Bootstrap.Admin.Controllers.Api
{
/// <summary>
///
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class SettingsController : ControllerBase
2018-06-07 00:45:47 +08:00
{
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
[HttpPost]
2018-06-07 12:25:03 +08:00
public bool Post([FromBody]BootstrapDict value)
2018-06-07 00:45:47 +08:00
{
//保存个性化设置
2018-06-07 12:25:03 +08:00
return DictHelper.SaveSettings(value);
2018-06-07 00:45:47 +08:00
}
/// <summary>
///
/// </summary>
[HttpGet]
public IEnumerable<ICacheCorsItem> Get()
{
return CacheManager.CorsSites;
}
}
}