Stuff
This commit is contained in:
@@ -22,7 +22,8 @@ class Donator(json.JSONEncoder):
|
||||
def top_donator(conn: Connection):
|
||||
cur = conn.cursor()
|
||||
cur.execute("""select name, sum(amount) from orders
|
||||
group by name
|
||||
group by name
|
||||
order by sum(amount) desc
|
||||
LIMIT 5
|
||||
""")
|
||||
data = cur.fetchall();
|
||||
|
||||
@@ -59,7 +59,7 @@ def index():
|
||||
|
||||
@app.route('/test')
|
||||
def test():
|
||||
p = Payment(int(random.random()*100),5000,'TEST DE MESSAGE BIEN LONG SKLDJQLKDJQLKSJDQLSKJDQLKJD','Nom donation')
|
||||
p = Payment(int(random.random()*100),0,'TEST DE MESSAGE BIEN LONG SKLDJQLKDJQLKSJDQLSKJDQLKJD','Test')
|
||||
p.save(get_db())
|
||||
notify_client_payment(p)
|
||||
return jsonify(p), 200
|
||||
|
||||
Reference in New Issue
Block a user