Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing-E
/
E_Team_KhuBox
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
김대연
2020-06-14 03:41:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7511bdd378faa23f030e2eb6e3dd35ae22f1dedb
7511bdd3
1 parent
2424ee82
회원정보 조회 리팩토링
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
khubox-api/khubox/services/users.py
khubox-api/khubox/services/users.py
View file @
7511bdd
...
...
@@ -95,7 +95,26 @@ def login(request):
# 회원정보 조회
def
find_me
(
request
):
return
{
'result'
:
True
}
# TODO: Auth
request
.
user_id
=
1
# Query
user
=
User
.
objects
.
filter
(
id
=
request
.
user_id
)
# Check Exists
if
len
(
user
)
!=
1
:
return
{
'result'
:
False
,
'error'
:
'잘못된 요청입니다.'
}
# Serialize
data
=
{
'id'
:
user
[
0
]
.
id
,
'email'
:
user
[
0
]
.
email
,
'name'
:
user
[
0
]
.
name
,
'root_folder'
:
user
[
0
]
.
root_folder
,
'created_at'
:
str
(
user
[
0
]
.
created_at
)
}
return
{
'result'
:
True
,
'data'
:
data
}
# 회원정보 수정
...
...
Please
register
or
login
to post a comment