Skip to content

Commit

Permalink
change json get method
Browse files Browse the repository at this point in the history
  • Loading branch information
200516bb committed Aug 7, 2023
1 parent 189798e commit 58f3990
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def get(self, code):
"https://kapi.kakao.com/v2/user/me", headers={"Authorization": f"Bearer {kakao_access_token}"}
).json()

u = UserSocialAuth.query.filter_by(id=str(profile_request['id'])).first()
u = UserSocialAuth.query.filter_by(id=str(profile_request.get("id"))).first()
if u:
#login
access_payload = {
Expand All @@ -381,10 +381,10 @@ def get(self, code):
#signup
user = UserService.create_user()
content = {
'id': profile_request['id'],
'connected_at': profile_request['connected_at'],
'id': str(profile_request.get("id")),
'connected_at': str(profile_request.get("connected_at")),
'social_type': 'kakao',
'access_token': kakao_access_token
'access_token': str(kakao_access_token)
}
UserService.create_social_auth(user, content)
return { 'message': '회원가입 되었습니다', 'user_id': str(user.id) }, 200
Expand Down

0 comments on commit 58f3990

Please sign in to comment.