first steps towards real listings!
This commit is contained in:
parent
3915843943
commit
f06d4fa945
1 changed files with 16 additions and 5 deletions
|
@ -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…
Reference in a new issue