mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
add settings page, add way to add/remove ignored pools
This commit is contained in:
parent
ecd7809749
commit
5fb7f66624
5 changed files with 126 additions and 0 deletions
|
@ -131,3 +131,17 @@ def get_ignored_pools(db):
|
|||
for pool in db.query(Ignored_Pools).all():
|
||||
ignored_pools.append(pool.id)
|
||||
return ignored_pools
|
||||
|
||||
|
||||
def delete_ignored_pool(db, pool):
|
||||
if db.query(exists().where(Ignored_Pools.id == pool)).scalar():
|
||||
ignored_pool = db.query(Ignored_Pools).filter(Ignored_Pools.id == pool).one()
|
||||
db.delete(ignored_pool)
|
||||
db.commit()
|
||||
|
||||
|
||||
def add_ignored_pool(db, pool):
|
||||
if not db.query(exists().where(Ignored_Pools.id == pool)).scalar():
|
||||
ignored_pool = Ignored_Pools(id=pool)
|
||||
db.add(ignored_pool)
|
||||
db.commit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue