diff --git a/Kyoo/Startup.cs b/Kyoo/Startup.cs index caf4030c..46c7eba0 100644 --- a/Kyoo/Startup.cs +++ b/Kyoo/Startup.cs @@ -52,8 +52,8 @@ namespace Kyoo services.AddDbContext(options => { options.UseLazyLoadingProxies() - .UseSqlite(_configuration.GetConnectionString("Database")) - .EnableSensitiveDataLogging(); + .UseSqlite(_configuration.GetConnectionString("Database")); + //.EnableSensitiveDataLogging(); //.UseLoggerFactory(LoggerFactory.Create(builder => builder.AddConsole())); }); diff --git a/Kyoo/Views/API/ProviderAPI.cs b/Kyoo/Views/API/ProviderAPI.cs new file mode 100644 index 00000000..019e304c --- /dev/null +++ b/Kyoo/Views/API/ProviderAPI.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using Kyoo.Models; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Kyoo.API +{ + [Route("api/provider")] + [Route("api/providers")] + [ApiController] + public class ProviderAPI : ControllerBase + { + private readonly DatabaseContext _database; + + public ProviderAPI(DatabaseContext database) + { + _database = database; + } + + [HttpGet("")] + [Authorize(Policy="Read")] + public ActionResult> Index() + { + return _database.Providers; + } + } +} \ No newline at end of file diff --git a/Kyoo/Views/WebClient b/Kyoo/Views/WebClient index 4ec71d48..e4cd29a4 160000 --- a/Kyoo/Views/WebClient +++ b/Kyoo/Views/WebClient @@ -1 +1 @@ -Subproject commit 4ec71d48a9d48a054ea68594d3b8b4e2a09b33de +Subproject commit e4cd29a489d5f20de42bb89f7db2c8299b7c5171