first steps towards real listings!

pull/4/head
Darksider3 5 years ago
parent 3915843943
commit f06d4fa945

@ -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:

Loading…
Cancel
Save