Showing
1 changed file
with
20 additions
and
1 deletions
... | @@ -95,7 +95,26 @@ def login(request): | ... | @@ -95,7 +95,26 @@ def login(request): |
95 | 95 | ||
96 | # 회원정보 조회 | 96 | # 회원정보 조회 |
97 | def find_me(request): | 97 | def find_me(request): |
98 | - return {'result': True} | 98 | + # TODO: Auth |
99 | + request.user_id = 1 | ||
100 | + | ||
101 | + # Query | ||
102 | + user = User.objects.filter(id=request.user_id) | ||
103 | + | ||
104 | + # Check Exists | ||
105 | + if len(user) != 1: | ||
106 | + return {'result': False, 'error': '잘못된 요청입니다.'} | ||
107 | + | ||
108 | + # Serialize | ||
109 | + data = { | ||
110 | + 'id': user[0].id, | ||
111 | + 'email': user[0].email, | ||
112 | + 'name': user[0].name, | ||
113 | + 'root_folder': user[0].root_folder, | ||
114 | + 'created_at': str(user[0].created_at) | ||
115 | + } | ||
116 | + | ||
117 | + return {'result': True, 'data': data} | ||
99 | 118 | ||
100 | 119 | ||
101 | # 회원정보 수정 | 120 | # 회원정보 수정 | ... | ... |
-
Please register or login to post a comment