using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Repository.Interface.AppStartPage;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace GxPress.Api.AdminControllers
{
///
/// app启动页管理
///
[Route("api/admin/app-start-page")]
[ApiController]
[Authorize]
public class AdminAppStartPage : Controller
{
private readonly IAppStartPageRepository appStartPageRepository;
public AdminAppStartPage(IAppStartPageRepository appStartPageRepository)
{
this.appStartPageRepository = appStartPageRepository;
}
///
/// 查询
///
///
[HttpGet("list")]
public async Task> GetAllAsync()
{
return await appStartPageRepository.GetAllAsync();
}
///
/// 删除
///
///
///
[HttpDelete("{id}")]
public async Task DeleteAsync(int id)
{
return await appStartPageRepository.DeleteAsync(id);
}
///
/// 修改
///
///
///
[HttpPut("")]
public async Task UpdateAsync(Entity.tede2.AppStartPage.AppStartPage model)
{
return await appStartPageRepository.UpdateAsync(model);
}
}
}