diff --git a/private/ListUsers.py b/private/ListUsers.py index 81bf72d..423be6e 100644 --- a/private/ListUsers.py +++ b/private/ListUsers.py @@ -3,13 +3,24 @@ from lib.sqlitedb import SQLitedb import lib.CFG as CFG + +class ListUsers: + db = None + usersFetch = None + + def __init__(self, ap: bool): + self.db = SQLitedb(CFG.REG_FILE) + if not ap: + query = "SELECT * FROM `applications` WHERE status = '1'" + else: + query = "SELECT * FROM `applications` WHERE status = '0'" + self.usersFetch = self.db.query(query) + print(self.usersFetch) + + if __name__ == "__main__": try: - SQLitedb(CFG.REG_FILE) - if CFG.args.unapproved: - print("yes! Only unapproved ones!") - else: - print("Just approved ones") + L = ListUsers(CFG.args.unapproved) print("hi") exit(0) except KeyboardInterrupt: