unclear what this was, saving this so I can wipe the local version of this project

This commit is contained in:
2025-06-12 16:46:52 -04:00
parent 312dbdd8a5
commit c329b81cfd
3 changed files with 27 additions and 1 deletions

View File

@ -31,7 +31,7 @@ namespace YTManager.Controllers {
private readonly MediaDB db;
// Maximum number of channels to return per query.
private readonly int max_per_query = 10;
private readonly int max_per_query = 250;
// Constructor to fetch the db context.
public ChannelsController(MediaDB context) => db = context;
@ -45,6 +45,7 @@ namespace YTManager.Controllers {
// Get all the relevant channels.
var chanels = await db.Channels
.Include(c => c.Videos)
.Include(c => c.UserTags)
.OrderByDescending(i => i.AddedtoDB)
.Take(max_per_query)
.ToListAsync();
@ -58,6 +59,7 @@ namespace YTManager.Controllers {
return Ok(converted);
}
// Adds a new channel.
[HttpPost("{channelid}")]
public async Task<IActionResult> PostChannel([FromRoute] string channelid) {
Console.WriteLine($"{DateTime.Now} == Channels POST -> {channelid}");