← back to Norma
auto-save: 2026-07-11T08:42:28 (1 files) — app/api/auth/login/route.ts
c42150599ba66be54d1bd785cedcd92c68f4b811 · 2026-07-11 08:42:35 -0700 · Steve Abrams
Files touched
M app/api/auth/login/route.ts
Diff
commit c42150599ba66be54d1bd785cedcd92c68f4b811
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sat Jul 11 08:42:35 2026 -0700
auto-save: 2026-07-11T08:42:28 (1 files) — app/api/auth/login/route.ts
---
app/api/auth/login/route.ts | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/app/api/auth/login/route.ts b/app/api/auth/login/route.ts
index dfdf60a..b461ec6 100644
--- a/app/api/auth/login/route.ts
+++ b/app/api/auth/login/route.ts
@@ -52,8 +52,11 @@ export async function POST(request: NextRequest) {
}
// Query tier_credentials by username only — verify password in application code
+ // NOTE: tier_credentials has no full_name / is_active / last_login_at columns
+ // in this deployment (migration not applied; schema changes are forbidden).
+ // Select only real columns; treat every account as active.
const result = await query(
- `SELECT username, role, org_id, display_name, full_name, client_type, password_hash, is_active
+ `SELECT username, role, org_id, display_name, client_type, password_hash
FROM tier_credentials WHERE username = $1`,
[username],
);
@@ -79,11 +82,7 @@ export async function POST(request: NextRequest) {
);
}
- // Bump last_login_at (best-effort; never block login on this)
- query(
- 'UPDATE tier_credentials SET last_login_at = NOW() WHERE username = $1',
- [row.username],
- ).catch(() => { /* non-fatal */ });
+ // (last_login_at bump removed — column not present in this schema)
// Auto-upgrade SHA-256 hashes to bcrypt on successful login
if (needsRehash) {
← 2439b98 dashboard: harden escaping for attribute context (contrarian
·
back to Norma
·
Fix tier_credentials schema drift in settings CRUD routes 9ba27ad →