File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515class UserService :
1616 def __init__ (self ):
1717 self .user_repository = UserRepository ()
18+ self .user_pool_id = os .environ .get ('COGNITO_USER_POOL_ID' , '' )
1819 if os .environ .get ('ENV' ) == 'local-profile' :
19- self .cognito_client = boto3 .client (
20- 'cognito-idp' ,
21- region_name = os .environ .get ('AWS_REGION' , 'ap-northeast-2' ),
20+ session = boto3 .Session (
2221 profile_name = os .environ .get ('AWS_PROFILE' , 'default' )
2322 )
23+ self .cognito_client = session .client (
24+ 'cognito-idp' ,
25+ region_name = os .environ .get ('AWS_REGION' , 'ap-northeast-2' )
26+ )
2427 else :
2528 self .cognito_client = boto3 .client (
2629 'cognito-idp' ,
2730 region_name = os .environ .get ('AWS_REGION' , 'ap-northeast-2' )
2831 )
29- self .user_pool_id = os .environ .get ('COGNITO_USER_POOL_ID' , '' )
3032
3133 def get_wallets (self , user_id : str ):
3234 wallets = self .user_repository .find_wallets_by_user_id (user_id )
You can’t perform that action at this time.
0 commit comments