Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
eue
Commits
9c4c6663
Commit
9c4c6663
authored
Aug 04, 2021
by
KangMin An
Browse files
Update: 기본 사용자 삭제.
parent
46008734
Changes
2
Show whitespace changes
Inline
Side-by-side
server/src/controllers/userController.js
View file @
9c4c6663
...
@@ -209,12 +209,12 @@ export const getConfirm = async (req, res) => {
...
@@ -209,12 +209,12 @@ export const getConfirm = async (req, res) => {
// 사용자 정보 요청 처리
// 사용자 정보 요청 처리
export
const
getUserInfo
=
async
(
req
,
res
)
=>
{
export
const
getUserInfo
=
async
(
req
,
res
)
=>
{
try
{
const
{
const
{
cookies
:
{
acs_token
},
cookies
:
{
acs_token
},
}
=
req
;
}
=
req
;
const
decoded
=
jwt
.
verify
(
acs_token
);
try
{
const
decoded
=
jwt
.
decode
(
acs_token
);
const
result_user
=
await
db
.
User
.
findAll
({
const
result_user
=
await
db
.
User
.
findAll
({
where
:
{
email
:
decoded
.
email
},
where
:
{
email
:
decoded
.
email
},
...
@@ -266,9 +266,6 @@ export const getUserInfo = async (req, res) => {
...
@@ -266,9 +266,6 @@ export const getUserInfo = async (req, res) => {
res
.
json
({
res
.
json
({
msg
:
resForm
.
msg
.
err
,
msg
:
resForm
.
msg
.
err
,
contents
:
{
contents
:
{
user_info
:
{
loc_code
:
3743011
,
},
error
:
err
,
error
:
err
,
},
},
});
});
...
...
server/src/routers/globalRouter.js
View file @
9c4c6663
...
@@ -30,7 +30,7 @@ globalRouter.get(routes.logout, onlyPrivate, getLogout);
...
@@ -30,7 +30,7 @@ globalRouter.get(routes.logout, onlyPrivate, getLogout);
globalRouter
.
get
(
routes
.
confirm
,
getConfirm
);
globalRouter
.
get
(
routes
.
confirm
,
getConfirm
);
// User Info
// User Info
globalRouter
.
get
(
routes
.
userinfo
,
getUserInfo
);
globalRouter
.
get
(
routes
.
userinfo
,
onlyPrivate
,
getUserInfo
);
globalRouter
.
post
(
routes
.
editProfile
,
onlyPrivate
,
postEditProfile
);
globalRouter
.
post
(
routes
.
editProfile
,
onlyPrivate
,
postEditProfile
);
globalRouter
.
get
(
routes
.
toggleAircon
,
onlyPrivate
,
getToggleAircon
);
globalRouter
.
get
(
routes
.
toggleAircon
,
onlyPrivate
,
getToggleAircon
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment