fix
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
namespace MyOffice.Web.Controllers;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Data.Repositories.Currency;
|
||||
using Models.Currency;
|
||||
using Services.Currency;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class GeneralController : BaseApiController
|
||||
{
|
||||
private readonly CurrencyService _currencyService;
|
||||
|
||||
public GeneralController(
|
||||
CurrencyService currencyService
|
||||
)
|
||||
{
|
||||
_currencyService = currencyService;
|
||||
}
|
||||
|
||||
[HttpGet("~/api/general/currencies")]
|
||||
public object Get()
|
||||
{
|
||||
var list = _currencyService.GetGlobalAll();
|
||||
|
||||
return list.Select(x => x.ToModel());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user