🐛 Fix sticker loading

This commit is contained in:
LittleSheep 2025-06-04 00:50:10 +08:00
parent 49d5ee6184
commit db9b04ef47

View File

@ -167,7 +167,6 @@ public class StickerController(AppDatabase db, StickerService st) : ControllerBa
var stickers = await db.Stickers var stickers = await db.Stickers
.Where(s => s.Pack.Id == packId) .Where(s => s.Pack.Id == packId)
.Include(e => e.Pack) .Include(e => e.Pack)
.Include(e => e.Image)
.OrderByDescending(e => e.CreatedAt) .OrderByDescending(e => e.CreatedAt)
.ToListAsync(); .ToListAsync();
@ -198,7 +197,6 @@ public class StickerController(AppDatabase db, StickerService st) : ControllerBa
var sticker = await db.Stickers var sticker = await db.Stickers
.Where(s => s.Pack.Id == packId && s.Id == id) .Where(s => s.Pack.Id == packId && s.Id == id)
.Include(e => e.Pack) .Include(e => e.Pack)
.Include(e => e.Image)
.FirstOrDefaultAsync(); .FirstOrDefaultAsync();
if (sticker is null) return NotFound(); if (sticker is null) return NotFound();