Commit ede947b3 authored by KangMin An's avatar KangMin An
Browse files

Merge branch 'kangmin' into premaster

parents a74a13f7 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,
}, },
}); });
......
...@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment