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) => {
// 사용자 정보 요청 처리
export const getUserInfo = async (req, res) => {
try {
const {
cookies: { acs_token },
} = req;
const decoded = jwt.verify(acs_token);
try {
const decoded = jwt.decode(acs_token);
const result_user = await db.User.findAll({
where: { email: decoded.email },
......@@ -266,9 +266,6 @@ export const getUserInfo = async (req, res) => {
res.json({
msg: resForm.msg.err,
contents: {
user_info: {
loc_code: 3743011,
},
error: err,
},
});
......
......@@ -30,7 +30,7 @@ globalRouter.get(routes.logout, onlyPrivate, getLogout);
globalRouter.get(routes.confirm, getConfirm);
// User Info
globalRouter.get(routes.userinfo, getUserInfo);
globalRouter.get(routes.userinfo, onlyPrivate, getUserInfo);
globalRouter.post(routes.editProfile, onlyPrivate, postEditProfile);
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