diff --git a/user.go b/user.go index 4cfb964..9c22a5b 100644 --- a/user.go +++ b/user.go @@ -47,11 +47,14 @@ func getUser(e string) (int, error) { } func addUser(u userInfo) { - users = append( - users, - user{ - Info: u, - admin: true, - }, - ) + _, err := getUser(u.Email) + if err != nil { + users = append( + users, + user{ + Info: u, + admin: true, + }, + ) + } }