diff --git a/package.json b/package.json index 341d92c..333de8c 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "lint": "eslint --cache --max-warnings 0", "build": "npx tsc", "run": "npx tsc && node .dist/src/", - "start": "npx tsc && npx pm2 start config/pm2.js", + "start": "npx tsc && npx pm2 start loginserver", "test": "npm run lint && npx tsc", - "reload": "npx tsc && npx pm2 reload config/pm2.js", - "stop": "npx pm2 stop config/pm2.js" + "reload": "npx tsc && npx pm2 reload loginserver", + "stop": "npx pm2 stop loginserver" }, "dependencies": { "bcrypt": "^5.0.1", diff --git a/src/actions.ts b/src/actions.ts index 86c1722..9e267ef 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -115,7 +115,8 @@ export function checkSuspectVerified( const userData: Partial<{ elo: number, gxe: number, coil: number }> = {}; const reqKeys = ['elo', 'coil', 'gxe'] as const; for (const k of reqKeys) { - if (!suspect[k]) continue; + const val = suspect[k]; + if (!val) continue; reqCount++; switch (k) { case 'coil': @@ -127,7 +128,7 @@ export function checkSuspectVerified( userData.coil = coilNum; break; case 'elo': case 'gxe': - if (suspect[k] && rating[k] >= suspect[k]!) { + if (rating[k] >= val) { reqsMet++; } userData[k] = rating[k];