Better filtering for lists on homepage
This commit is contained in:
parent
2811a784cc
commit
01efceca45
5
shop.py
5
shop.py
@ -109,11 +109,10 @@ def get_items(user_id, list_id=None):
|
||||
return runQuery(query, data)
|
||||
|
||||
def get_list_ids(user_id):
|
||||
query = "select list_id from USER_META where user_id = %s"
|
||||
query = "select USER_META.list_id, LISTS.name from USER_META inner join LISTS on LISTS.id = USER_META.list_id where USER_META.user_id = %s"
|
||||
data = (user_id,)
|
||||
ret = runQuery(query, data)
|
||||
list_ids = [idx for idx, in ret]
|
||||
return list_ids
|
||||
return ret
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config["DEBUG"] = True
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
vpn_key
|
||||
</i></button></a>
|
||||
</div>
|
||||
<div>
|
||||
{{data["list_ids"]}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- jQuery library -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user