feat(frontend): working Discord login + signup
This commit is contained in:
parent
0e72097346
commit
c8b5b7e2c2
24 changed files with 287 additions and 119 deletions
|
@ -35,7 +35,9 @@ type PartialMember struct {
|
|||
ID xid.ID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
DisplayName *string `json:"display_name"`
|
||||
Bio *string `json:"bio"`
|
||||
AvatarURLs []string `json:"avatar_urls"`
|
||||
Links []string `json:"links"`
|
||||
Names []db.FieldEntry `json:"names"`
|
||||
Pronouns []db.PronounEntry `json:"pronouns"`
|
||||
}
|
||||
|
@ -59,7 +61,9 @@ func dbUserToResponse(u db.User, fields []db.Field, members []db.Member) GetUser
|
|||
ID: members[i].ID,
|
||||
Name: members[i].Name,
|
||||
DisplayName: members[i].DisplayName,
|
||||
Bio: members[i].Bio,
|
||||
AvatarURLs: db.NotNull(members[i].AvatarURLs),
|
||||
Links: db.NotNull(members[i].Links),
|
||||
Names: db.NotNull(members[i].Names),
|
||||
Pronouns: db.NotNull(members[i].Pronouns),
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ type PatchUserRequest struct {
|
|||
}
|
||||
|
||||
// patchUser parses a PatchUserRequest and updates the user with the given ID.
|
||||
// TODO: could this be refactored to be less repetitive? names, pronouns, and fields are all validated in the same way
|
||||
func (s *Server) patchUser(w http.ResponseWriter, r *http.Request) error {
|
||||
ctx := r.Context()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue