fix: key_plain -> key in dashboard query
This commit is contained in:
parent
e461d73ce3
commit
15227b9c6e
|
|
@ -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 });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue