Skip to content

Commit

Permalink
fix: kakao api
Browse files Browse the repository at this point in the history
  • Loading branch information
200516bb committed Jul 31, 2023
1 parent 6b8bf26 commit 7c7df15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions app/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,11 @@ def post(self):
return UserService.update_device_token(content['device_token']), 200


@user.route('/oauth/kakao', methods=['GET'])
@user.route('/oauth/kakao/<string:code>', methods=['GET'])
class KakaoOauth(Resource):
@user.doc(responses={200: 'OK'})
@user.doc(responses={400: 'Bad Request'})
def get(self):
code = str(request.args.get('code'))

def get(self, code):
oauth_token = requests.post(
url="https://kauth.kakao.com/oauth/token",
headers={
Expand Down
2 changes: 1 addition & 1 deletion app/utils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def create_social_auth(user, content):
id=content['id'],
user_id=user.id,
connected_at=content['connected_at'],
social_type=content['type'],
social_type=content['social_type'],
access_token=content['access_token']
)
try:
Expand Down

0 comments on commit 7c7df15

Please sign in to comment.