diff --git a/Controllers/QuoteController.cs b/Controllers/QuoteController.cs index 6ff2fc7..fc3cce2 100644 --- a/Controllers/QuoteController.cs +++ b/Controllers/QuoteController.cs @@ -255,7 +255,8 @@ public class QuotesController : ControllerBase { IQueryable query = _db.Quotes .Include(q => q.QuoteCategories!) - .ThenInclude(qc => qc.Category); + .ThenInclude(qc => qc.Category) + .Include(q => q.Image); if (category_id.HasValue) { @@ -278,8 +279,6 @@ public class QuotesController : ControllerBase var skip = random.Next(0, totalQuotes); var quote = await query - .Include(q => q.QuoteCategories!) - .ThenInclude(qc => qc.Category) .Skip(skip) .Take(1) .FirstOrDefaultAsync();