From 4e056632c8206b46612f00236a16a456b9f142d3 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 10 May 2023 00:46:25 +0200 Subject: [PATCH] fix(backend): return display_name in GET /users/:id/members --- backend/routes/member/get_members.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/backend/routes/member/get_members.go b/backend/routes/member/get_members.go index 34c0b35..12afd6e 100644 --- a/backend/routes/member/get_members.go +++ b/backend/routes/member/get_members.go @@ -26,13 +26,14 @@ func membersToMemberList(ms []db.Member, isSelf bool) []memberListResponse { resps := make([]memberListResponse, len(ms)) for i := range ms { resps[i] = memberListResponse{ - ID: ms[i].ID, - Name: ms[i].Name, - Bio: ms[i].Bio, - Avatar: ms[i].Avatar, - Links: db.NotNull(ms[i].Links), - Names: db.NotNull(ms[i].Names), - Pronouns: db.NotNull(ms[i].Pronouns), + ID: ms[i].ID, + Name: ms[i].Name, + DisplayName: ms[i].DisplayName, + Bio: ms[i].Bio, + Avatar: ms[i].Avatar, + Links: db.NotNull(ms[i].Links), + Names: db.NotNull(ms[i].Names), + Pronouns: db.NotNull(ms[i].Pronouns), } if isSelf {