Skip to content

Commit

Permalink
Fixed tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
weibeu committed May 9, 2019
1 parent 43e43f8 commit 62b6f61
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ from flask import Flask, redirect, url_for
from flask_discord import DiscordOAuth2Session

CONFIGS = {
"client_id": 9999999999,
"client_secret": "your client secret",
"redirect_uri": "default redirect uri",
"client_id": 9999999999,
"client_secret": "your client secret",
"redirect_uri": "default redirect uri",
}

app = Flask(__name__)
Expand All @@ -29,28 +29,28 @@ discord = DiscordOAuth2Session(**CONFIGS)

@app.route("/login")
def login():
return discord.create_session()
return discord.create_session()


@app.route("/callback")
def callback():
discord.callback()
return redirect(url_for(".me"))
discord.callback()
return redirect(url_for(".me"))


@app.route("/me")
def me():
user = discord.fetch_user()
return f"""
<html>
<head>
<title>{user.name}</title>
</head>
<body>
<img src='{user.avatar_url}' />
</body>
</html>
"""
user = discord.fetch_user()
return f"""
<html>
<head>
<title>{user.name}</title>
</head>
<body>
<img src='{user.avatar_url}' />
</body>
</html>
"""


if __name__ == "__main__":
Expand Down

0 comments on commit 62b6f61

Please sign in to comment.