diff --git a/ProjectLighthouse/Controllers/CommentController.cs b/ProjectLighthouse/Controllers/CommentController.cs index 1b251917..a1f056fc 100644 --- a/ProjectLighthouse/Controllers/CommentController.cs +++ b/ProjectLighthouse/Controllers/CommentController.cs @@ -22,6 +22,7 @@ namespace ProjectLighthouse.Controllers { public async Task GetComments(string username) { List comments = await database.Comments .Include(c => c.Target) + .Include(c => c.Poster) .Where(c => c.Target.Username == username) .ToListAsync(); diff --git a/ProjectLighthouse/Controllers/SlotsController.cs b/ProjectLighthouse/Controllers/SlotsController.cs index cd8a544c..c38fcaef 100644 --- a/ProjectLighthouse/Controllers/SlotsController.cs +++ b/ProjectLighthouse/Controllers/SlotsController.cs @@ -16,11 +16,12 @@ namespace ProjectLighthouse.Controllers { } [HttpGet("slots/by")] - public IActionResult SlotsBy() { + public IActionResult SlotsBy([FromQuery] string u) { string response = Enumerable.Aggregate( database.Slots .Include(s => s.Creator) .Include(s => s.Location) + .Where(s => s.Creator.Username == u) , string.Empty, (current, slot) => current + slot.Serialize()); return this.Ok(LbpSerializer.TaggedStringElement("slots", response, "total", 1));