mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
Minor name change
This commit is contained in:
@@ -5,7 +5,7 @@ from flask import request, session, redirect
|
|||||||
|
|
||||||
class DiscordOAuth2Session(_http.DiscordOAuth2HttpClient):
|
class DiscordOAuth2Session(_http.DiscordOAuth2HttpClient):
|
||||||
|
|
||||||
def make_session(self, scope=None):
|
def create_session(self, scope=None):
|
||||||
scope = scope or request.args.get("scope", str()).split() or configs.DEFAULT_SCOPES
|
scope = scope or request.args.get("scope", str()).split() or configs.DEFAULT_SCOPES
|
||||||
discord_session = self._make_session(scope=scope)
|
discord_session = self._make_session(scope=scope)
|
||||||
authorization_url, state = discord_session.authorization_url(configs.AUTHORIZATION_BASE_URL)
|
authorization_url, state = discord_session.authorization_url(configs.AUTHORIZATION_BASE_URL)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ discord = DiscordOAuth2Session(OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_RE
|
|||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
return discord.make_session(configs.ALL_SCOPES)
|
return discord.create_session(configs.ALL_SCOPES)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/callback")
|
@app.route("/callback")
|
||||||
|
|||||||
Reference in New Issue
Block a user