From ca6d979e5a4016835bd6e7e9ab444dea0ce0ebb6 Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Thu, 21 Aug 2025 20:56:42 -0500 Subject: [PATCH] Update npm scripts --- package.json | 6 +++--- src/actions.ts | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) 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];