skip not pending request when -list is used

This commit is contained in:
T T 2018-11-10 15:13:44 +01:00
parent f89567986d
commit 985f0bb56f
2 changed files with 7 additions and 0 deletions

View File

@ -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 != "" &&

View File

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