don't allow duplicate users to be added

This commit is contained in:
dm
2016-08-22 21:08:06 -07:00
parent 36a90e04c8
commit d2349d2105
+3
View File
@@ -47,6 +47,8 @@ func getUser(e string) (int, error) {
}
func addUser(u userInfo) {
_, err := getUser(u.Email)
if err != nil {
users = append(
users,
user{
@@ -55,3 +57,4 @@ func addUser(u userInfo) {
},
)
}
}