diff --git a/main.go b/main.go index 111bb2d..ab35468 100644 --- a/main.go +++ b/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 != "" && diff --git a/reguser/main.go b/reguser/main.go index 6ccda32..8e24378 100644 --- a/reguser/main.go +++ b/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)) } }