os var import fix

This commit is contained in:
Łukasz Jędyk 2022-01-24 20:34:03 +01:00
parent 5d730cdfe3
commit 7dd6a34338

View File

@ -6,9 +6,6 @@ from ayct_backend.twitter.models import *
twitter = Blueprint('twitter', __name__)
consumer_key = current_app.config["TWITTER_CONSUMER_KEY"]
consumer_secret = current_app.config["TWITTER_CONSUMER_SECERT"]
@twitter.route('/account', methods=['GET'])
def get_twitter_accounts():
twitter_accounts = TwitterAccount.query.all()
@ -39,6 +36,9 @@ def add_twitter_account():
status=400,
)
else:
consumer_key = current_app.config["TWITTER_CONSUMER_KEY"]
consumer_secret = current_app.config["TWITTER_CONSUMER_SECERT"]
oauth = OAuth1Session(
consumer_key,
client_secret=consumer_secret