소스 검색

Fix bug: wrong variable

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

+ 3 - 1
routes/user.js

@@ -52,10 +52,12 @@ router.post('/', async (req, res) => {
 				admin: true
 			}})
 
-			if(admin) {
+			if(adminUser) {
+
 				validationErrors.push(Errors.missingParameter('token'))
 				throw Errors.VALIDATION_ERROR
 			} else {
+				
 				userParams.admin = true
 			}
 		} else if(req.body.admin && req.body.token) {