output countries in settings

This commit is contained in:
2020-04-13 12:41:22 +02:00
parent 47a5742d49
commit 2ebf7edc9b
9 changed files with 170 additions and 12 deletions
@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using zero.Core;
using zero.Core.Api;
namespace zero.Web.Controllers
{
[AllowAnonymous]
public class CountriesController : BackofficeController
{
private ICountriesApi Api { get; set; }
public CountriesController(IZeroConfiguration config, ICountriesApi api) : base(config)
{
Api = api;
}
public async Task<IActionResult> GetAll()
{
return Json(await Api.GetAll("en-US"));
}
}
}