Skip to content
Snippets Groups Projects
Commit a61d1245 authored by Jinyeong Kim's avatar Jinyeong Kim
Browse files

fix conf_name

parents cde5e98d eafc8e84
No related branches found
No related tags found
No related merge requests found
...@@ -14,12 +14,13 @@ router.get('/change', (req, res) => { ...@@ -14,12 +14,13 @@ router.get('/change', (req, res) => {
router.post('/change', async (req, res) => { router.post('/change', async (req, res) => {
const { email, newName } = req.body; const { email, newName } = req.body;
const user = await User.findOne({ email });
try { try {
if (!email || !newName) { if (!email || !newName) {
return res.status(400).json({message: '유효하지 않은 요청입니다.'}); return res.status(400).json({message: '유효하지 않은 요청입니다.'});
} }
const user = await User.findOne({ email });
// 사용자 존재 여부 확인 // 사용자 존재 여부 확인
if (!user) { if (!user) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment