using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Repository.Interface.SystemLabel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace GxPress.Api.AdminControllers
{
///
/// 系统标签管理
///
[Route("api/admin/system-label")]
[ApiController]
[Authorize]
public class AdminSystemLabelController : ControllerBase
{
private readonly ISystemLabelRepository _repository;
public AdminSystemLabelController(ISystemLabelRepository repository)
{
_repository = repository;
}
[HttpPost]
public async Task Insert(Entity.SystemLabel.SystemLabel note)
{
return await _repository.InsertAsync(note);
}
[HttpPut]
public async Task UpdateAsync(Entity.SystemLabel.SystemLabel note)
{
return await _repository.UpdateAsync(note);
}
[HttpGet]
public async Task> GetAllAsync()
{
return await _repository.GetAllAsync();
}
}
}