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

27 lines
651 B
C#
Raw Normal View History

2018-06-07 00:45:47 +08:00
using Bootstrap.DataAccess;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
namespace Bootstrap.Admin.Controllers.Api
{
/// <summary>
/// 数据字典分类
/// </summary>
2018-06-07 00:45:47 +08:00
[Route("api/[controller]")]
[ApiController]
public class CategoryController : ControllerBase
2018-06-07 00:45:47 +08:00
{
/// <summary>
/// 获取字典表中所有Category数据
2018-06-07 00:45:47 +08:00
/// </summary>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public IEnumerable<string> Get()
2018-06-07 00:45:47 +08:00
{
return DictHelper.RetrieveCategories();
}
}
}