fix(guild): populate leader_name in search results (matches prod capture)
Add IViewerRepository.LoadDisplayNamesAsync (batch AsNoTracking select), extend GuildSearchEntry with LeaderName, enrich GuildService.SearchAsync with a leader-id batch lookup, and thread the name through the controller's ToDetailDto call. Adds a leader_name assertion to GuildSearchFlowTests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,7 @@ public sealed class GuildController : SVSimController
|
||||
{
|
||||
if (!TryGetViewerId(out var v)) return Unauthorized();
|
||||
var entries = await _guild.SearchAsync(req.GuildName ?? "", req.Activity, req.JoinCondition, req.MemberConditionRange, ct);
|
||||
return new GuildSearchGuildResponse { List = entries.Select(e => ToDetailDto(e.Guild, e.MemberNum)).ToList() };
|
||||
return new GuildSearchGuildResponse { List = entries.Select(e => ToDetailDto(e.Guild, e.MemberNum, e.LeaderName)).ToList() };
|
||||
}
|
||||
|
||||
[HttpPost("emblem_list")]
|
||||
|
||||
Reference in New Issue
Block a user