fix: correctly assign member

This commit is contained in:
Teajey 2024-11-21 16:09:57 +09:00
parent 98a39f8e4f
commit b48140e9c3
Signed by: Teajey
GPG Key ID: 970E790FE834A713
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ func (ctx *Context) GroupPost(currentUser *db.User, w http.ResponseWriter, r *ht
writeGeneralErrorJson(w, http.StatusBadRequest, "Groups exists, but failed to add user with id %s: %s", userId, err) writeGeneralErrorJson(w, http.StatusBadRequest, "Groups exists, but failed to add user with id %s: %s", userId, err)
return return
} }
group.Members = append(group.Members, *currentUser) group.Members = append(group.Members, *user)
} }
_ = json.NewEncoder(w).Encode(group) _ = json.NewEncoder(w).Encode(group)