fix: key_plain -> key in dashboard query

This commit is contained in:
M1 2026-03-17 06:51:27 +04:00
parent e461d73ce3
commit 15227b9c6e
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ export const dashboard = new Elysia()
if (!accountId) return redirect("/dashboard"); if (!accountId) return redirect("/dashboard");
const [acc] = await sql`SELECT id, email_hash, created_at FROM accounts WHERE id = ${accountId}`; const [acc] = await sql`SELECT id, email_hash, created_at FROM accounts WHERE id = ${accountId}`;
const apiKeys = await sql`SELECT id, key_plain, label, created_at, last_used_at FROM api_keys WHERE account_id = ${accountId} ORDER BY created_at DESC`; const apiKeys = await sql`SELECT id, key, label, created_at, last_used_at FROM api_keys WHERE account_id = ${accountId} ORDER BY created_at DESC`;
const loginKey = cookie?.pingql_key?.value ?? null; const loginKey = cookie?.pingql_key?.value ?? null;
return html("settings", { nav: "settings", account: acc, apiKeys, accountId, loginKey }); return html("settings", { nav: "settings", account: acc, apiKeys, accountId, loginKey });