using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; using System.Threading; using System.Collections.Generic; namespace AsbCloudWebApi.Controllers { /// /// Категорий документов файлов /// [Route("api/fileCategory")] [ApiController] [Authorize] public class FileCategoryController : CrudController> { private readonly IFileCategoryService fileCategoryService; public FileCategoryController(ICrudService service, IFileCategoryService fileCategoryService) : base(service) { this.fileCategoryService = fileCategoryService; } /// /// Получение справочника категорий файлов /// /// [HttpGet] [Route("/getWellFileCategory")] //[Permission] public async Task GetWellFileCategory(CancellationToken token = default) { var data = await fileCategoryService.GetWellCategoryAsync(token); return Ok(data); } } }