Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

issue#67, updated get_api to accept user parameter so users other than c... #68

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flask_social/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def __init__(self, id, module, install, *args, **kwargs):
self.id = id
self.module = module

def get_connection(self):
def get_connection(self,user=current_user):
return _social.datastore.find_connection(provider_id=self.id,
user_id=current_user.id)
user_id=user.id)

def get_api(self):
def get_api(self,user=current_user):
module = import_module(self.module)
connection = self.get_connection()
connection = self.get_connection(user)
if connection is None:
return None
return module.get_api(connection=connection,
Expand Down