.BANCHO. Add /api/v1/onlineUsers
This commit is contained in:
parent
e5d4e2e17a
commit
26f64e8610
7
pep.py
7
pep.py
|
@ -111,7 +111,7 @@ def serverStatus():
|
||||||
})
|
})
|
||||||
|
|
||||||
@app.route("/api/v1/isOnline")
|
@app.route("/api/v1/isOnline")
|
||||||
def apiUserOnline():
|
def apiIsOnline():
|
||||||
username = request.args.get("u")
|
username = request.args.get("u")
|
||||||
if username == None:
|
if username == None:
|
||||||
result = False
|
result = False
|
||||||
|
@ -122,6 +122,11 @@ def apiUserOnline():
|
||||||
"result": result
|
"result": result
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@app.route("/api/v1/onlineUsers")
|
||||||
|
def apiOnlineUsers():
|
||||||
|
return flask.jsonify({
|
||||||
|
"result": len(glob.tokens.tokens)
|
||||||
|
})
|
||||||
|
|
||||||
# Main bancho server
|
# Main bancho server
|
||||||
@app.route("/", methods=['GET', 'POST'])
|
@app.route("/", methods=['GET', 'POST'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user