diff --git a/packages/server/server.go b/packages/server/server.go index e526e9a..8ecd25c 100644 --- a/packages/server/server.go +++ b/packages/server/server.go @@ -105,14 +105,14 @@ func loginIsCorrect(l string, logins *[]string) bool { } func newParticipant(l string) (*types.Participant, error) { + var err error p := new(types.Participant) - idInt, err := strconv.Atoi(strings.Split(l, "-")[0]) + p.ID, err = strconv.Atoi(strings.Split(l, "-")[0]) if err != nil { return nil, fmt.Errorf("newParticipant: strconv.Atoi(idString): %v\n", err) } - p.ID = int64(idInt) return p, nil }