diff options
| author | GitHub Action <[email protected]> | 2025-11-08 01:59:02 +0000 |
|---|---|---|
| committer | GitHub Action <[email protected]> | 2025-11-08 01:59:02 +0000 |
| commit | 34ff87d504836ff71b3bb2d466842c00ee3c5ec2 (patch) | |
| tree | cc8ac777f2f082ff676b179017c7dc0f3270314b /packages/console/core/script | |
| parent | 16357e804145b7f96a2a53badb7dcb6c5453dafe (diff) | |
| download | opencode-34ff87d504836ff71b3bb2d466842c00ee3c5ec2.tar.gz opencode-34ff87d504836ff71b3bb2d466842c00ee3c5ec2.zip | |
chore: format code
Diffstat (limited to 'packages/console/core/script')
| -rw-r--r-- | packages/console/core/script/lookup-user.ts | 13 | ||||
| -rw-r--r-- | packages/console/core/script/reset-db.ts | 10 |
2 files changed, 4 insertions, 19 deletions
diff --git a/packages/console/core/script/lookup-user.ts b/packages/console/core/script/lookup-user.ts index af9bcc3a1..1ae18c4dd 100644 --- a/packages/console/core/script/lookup-user.ts +++ b/packages/console/core/script/lookup-user.ts @@ -8,22 +8,15 @@ if (!email) { process.exit(1) } -const authData = await printTable("Auth", (tx) => - tx.select().from(AuthTable).where(eq(AuthTable.subject, email)), -) +const authData = await printTable("Auth", (tx) => tx.select().from(AuthTable).where(eq(AuthTable.subject, email))) if (authData.length === 0) { console.error("User not found") process.exit(1) } -await printTable("Auth", (tx) => - tx.select().from(AuthTable).where(eq(AuthTable.accountID, authData[0].accountID)), -) +await printTable("Auth", (tx) => tx.select().from(AuthTable).where(eq(AuthTable.accountID, authData[0].accountID))) -function printTable( - title: string, - callback: (tx: Database.TxOrDb) => Promise<any[]>, -): Promise<any[]> { +function printTable(title: string, callback: (tx: Database.TxOrDb) => Promise<any[]>): Promise<any[]> { return Database.use(async (tx) => { const data = await callback(tx) console.log(`== ${title} ==`) diff --git a/packages/console/core/script/reset-db.ts b/packages/console/core/script/reset-db.ts index bd00e1962..02d498901 100644 --- a/packages/console/core/script/reset-db.ts +++ b/packages/console/core/script/reset-db.ts @@ -8,14 +8,6 @@ import { KeyTable } from "../src/schema/key.sql.js" if (Resource.App.stage !== "frank") throw new Error("This script is only for frank") -for (const table of [ - AccountTable, - BillingTable, - KeyTable, - PaymentTable, - UsageTable, - UserTable, - WorkspaceTable, -]) { +for (const table of [AccountTable, BillingTable, KeyTable, PaymentTable, UsageTable, UserTable, WorkspaceTable]) { await Database.use((tx) => tx.delete(table)) } |
