소스 검색

Add edge case if no parameter is provided

sbkwgh 8 년 전
부모
커밋
ef0e5bb464
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      routes/user.js

+ 2 - 0
routes/user.js

@@ -334,6 +334,8 @@ router.put('/:username', async (req, res) => {
 				validationErrors.push(Errors.invalidLoginCredentials)
 				throw validationErrors
 			}
+		} else {
+			res.json({})
 		}
 	} catch (e) {
 		if(validationErrors.length) {