Files
2025-07-02 18:51:46 +08:00

26 lines
706 B
C#

using Dlhis.External.OpenApi.Response;
using Dlhis.External.OpenApi.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.External.OpenApi.Controllers
{
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class FactoryController : ControllerBase
{
private readonly IFactoryService _factoryService;
public FactoryController(IFactoryService factoryService)
{
_factoryService = factoryService;
}
[HttpGet("all")]
public async Task<List<FactoryResponse>> GetAllFactoriesAsync()
{
return await _factoryService.GetAllFactoriesAsync();
}
}
}