forked from bton/matekasse
penis
This commit is contained in:
parent
9145ede016
commit
3df799a491
1 changed files with 6 additions and 5 deletions
9
main.py
9
main.py
|
@ -7,7 +7,7 @@ import atexit
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
db_path = 'mate.db'
|
db_path = 'mate.db'
|
||||||
conn = sqlite3.connect(db_path)
|
conn = sqlite3.connect(db_path, check_same_thread=False)
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
@ -58,9 +58,9 @@ def adduser():
|
||||||
if c.fetchall() == []:
|
if c.fetchall() == []:
|
||||||
c.execute("INSERT or IGNORE INTO users (username, balance) VALUES ('%s', 0)" % user)
|
c.execute("INSERT or IGNORE INTO users (username, balance) VALUES ('%s', 0)" % user)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
return "alert('Added userd')"
|
return 'Added user <a href="/list">user and tag list</a> <p>The creator of this website accepts no liability for any linguistic or technical errors!</p>'
|
||||||
else:
|
else:
|
||||||
return "alert('User already exists')"
|
return 'User already exists <a href="/list">user and tag list</a> <p>The creator of this website accepts no liability for any linguistic or technical errors!</p>'
|
||||||
|
|
||||||
|
|
||||||
@app.route("/change", methods=['GET'])
|
@app.route("/change", methods=['GET'])
|
||||||
|
@ -142,4 +142,5 @@ def get_id():
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
atexit.register(exit_handler)
|
atexit.register(exit_handler)
|
||||||
socketio.run(app)
|
socketio.run(app, host='0.0.0.0', port=5000)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue