Huge API rewrite
This commit is contained in:
@ -20,7 +20,7 @@ namespace YTManager.Controllers {
|
||||
Title = c.Title;
|
||||
Description = c.Description;
|
||||
ID = c.YoutubeID;
|
||||
Video_IDs = c.Videos?.Select(v => v.YoutubeID).ToList();
|
||||
Video_IDs = c.Videos.Select(v => v.YoutubeID).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ namespace YTManager.Controllers {
|
||||
public async Task<IActionResult> Get() {
|
||||
// Get all the relevant channels.
|
||||
var chanels = await db.Channels
|
||||
.Include(c => c.Videos)
|
||||
.OrderByDescending(i => i.AddedtoDB)
|
||||
.Take(max_per_query)
|
||||
.ToListAsync();
|
||||
|
Reference in New Issue
Block a user