Răsfoiți Sursa

기여 횟수 시스템 변경

2DU 8 ani în urmă
părinte
comite
5ae10d5d2f
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      app.py

+ 6 - 2
app.py

@@ -2970,8 +2970,12 @@ def custom_js_view():
         )
 
 @route('/count')
-def count_edit():
-    curs.execute("select count(title) from history where ip = '" + ip_check() + "'")
+@route('/count/<name:path>')
+def count_edit(name = None):
+    if(name == None):
+        curs.execute("select count(title) from history where ip = ?", [ip_check()])
+    else:
+        curs.execute("select count(title) from history where ip = ?", [name])
     count = curs.fetchall()
     if(count):
         data = count[0][0]