ignore: create key for new workspace

This commit is contained in:
Dax Raad
2025-08-29 19:56:14 -04:00
parent 46927ee9a5
commit 25e53e090b
2 changed files with 17 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import { Identifier } from "./identifier"
import { UserTable } from "./schema/user.sql"
import { BillingTable } from "./schema/billing.sql"
import { WorkspaceTable } from "./schema/workspace.sql"
import { Key } from "./key"
export namespace Workspace {
export const create = fn(z.void(), async () => {
@@ -28,6 +29,15 @@ export namespace Workspace {
balance: centsToMicroCents(100),
})
})
await Actor.provide(
"system",
{
workspaceID,
},
async () => {
await Key.create({ name: "Default API Key" })
},
)
return workspaceID
})