Requested final checks only:
scaffold/pm-api/src/routes/v2-admin.tsregenerate UPDATE query008-hash-tokens.sqltarget table sanity- Build check (if possible)
From:
git diff main...fix/issue-3-token-hashing -- scaffold/pm-api/src/routes/v2-admin.ts | grep -A2 "regenerate\|UPDATE auth_tokens"
Observed:
- SQL is now:
UPDATE auth_tokens SET token = ?, token_hash = ?, created_at = CURRENT_TIMESTAMP WHERE token = ? OR token_hash = ?
- Args are now:
[body.newToken, newTokenHash, token, await hashToken(token)]
This satisfies both required conditions:
- Uses
SET token = ?, token_hash = ?(nottoken = NULL) - Includes new token value as first parameter
scaffold/pm-api/sql/008-hash-tokens.sql clearly targets auth_tokens:
ALTER TABLE auth_tokens ADD COLUMN token_hash TEXT;CREATE UNIQUE INDEX ... ON auth_tokens(token_hash);
Ran npm run build in scaffold/pm-api.
TypeScript build currently fails, but errors are in other files (e.g. src/index.ts, v2-meetings.ts, v2-rewards.ts) and are not related to the regenerate token query change.
For the requested issue-specific final verification, implementation is correct. Approving.