Browse Source

skip not pending request when -list is used

master
T T 3 years ago
parent
commit
985f0bb56f
  1. 4
      main.go
  2. 3
      reguser/main.go

4
main.go

@ -8,6 +8,10 @@ type Request struct {
Status string
}
func (r *Request) IsPending() bool {
return r.Status == "Pending"
}
func (r *Request) IsValid() bool {
return r.Username != "" &&
r.Email != "" &&

3
reguser/main.go

@ -91,6 +91,9 @@ func getAllPendingRequests() {
log.Println(err)
continue
}
if !r.IsPending() {
continue
}
log.Printf("%v: %v", r.Username, pathToId(path))
}
}

Loading…
Cancel
Save