using System.Collections.Generic; using System.Threading.Tasks; using GxPress.Auth; using GxPress.Entity; using GxPress.Repository.Interface; using GxPress.Request.ArticleGroup; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace GxPress.Api.AppControllers { /// /// 文章组 /// [Route("api/app/article-group")] [ApiController] [Authorize] public class ArticleGroupController : Controller { private readonly IArticleGroupRepository _processGroupRepository; private readonly ILoginContext _loginContext; public ArticleGroupController(IArticleGroupRepository processGroupRepository, ILoginContext loginContext) { _processGroupRepository = processGroupRepository; _loginContext = loginContext; } /// /// 列表 /// /// [HttpGet("list")] public async Task> GetList() { return await _processGroupRepository.GetListAsync(_loginContext.AccountId); } } }