don't allow duplicate users to be added

This commit is contained in:
Derek McQuay 2016-08-22 21:08:06 -07:00
parent 36a90e04c8
commit d2349d2105

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{
@ -54,4 +56,5 @@ func addUser(u userInfo) {
admin: true,
},
)
}
}