namespace MyOffice.Web.Controllers; using AutoMapper; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using Models.Currency; using Services.Currency; using MyOffice.Web.Infrastructure.Attributes; [Authorize] [DefaultFromBody] public class GeneralController : BaseApiController { private readonly CurrencyService _currencyService; private readonly IMapper _mapper; public GeneralController( CurrencyService currencyService, IMapper mapper ) { _currencyService = currencyService; _mapper = mapper; } public ObjectResult GetGlobalCurrencies() { var list = _currencyService.GetGlobalAll(); return Ok(_mapper.Map>(list)); } }