added some more doc for the funcs
This commit is contained in:
parent
08880ea88b
commit
840db08294
6
user.go
6
user.go
@ -21,10 +21,7 @@ type userInfo struct {
|
|||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *user) addTranx(t tranx) {
|
//authorizedEmail checks whether the email coming in is in the preapproved list
|
||||||
u.txs = append(u.txs, t)
|
|
||||||
}
|
|
||||||
|
|
||||||
func authorizedEmail(e string) bool {
|
func authorizedEmail(e string) bool {
|
||||||
b := false
|
b := false
|
||||||
for _, i := range authEmails {
|
for _, i := range authEmails {
|
||||||
@ -46,6 +43,7 @@ func getUser(e string) (int, error) {
|
|||||||
return 0, fmt.Errorf("could not find user")
|
return 0, fmt.Errorf("could not find user")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//addUser adds user to slice of users
|
||||||
func addUser(u userInfo) {
|
func addUser(u userInfo) {
|
||||||
_, err := getUser(u.Email)
|
_, err := getUser(u.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user