mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
New test suits
This commit is contained in:
@@ -16,13 +16,13 @@ def index():
|
||||
return discord.create_session()
|
||||
|
||||
|
||||
@app.route("/callback")
|
||||
@app.route("/callback/")
|
||||
def callback():
|
||||
discord.callback()
|
||||
return redirect(url_for(".me"))
|
||||
|
||||
|
||||
@app.route("/me")
|
||||
@app.route("/me/")
|
||||
def me():
|
||||
user = discord.fetch_user()
|
||||
return f"""
|
||||
@@ -37,5 +37,11 @@ def me():
|
||||
"""
|
||||
|
||||
|
||||
@app.route("/logout/")
|
||||
def logout():
|
||||
discord.revoke()
|
||||
return redirect(url_for(".index"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
|
||||
Reference in New Issue
Block a user