summaryrefslogtreecommitdiffhomepage
path: root/cloud/core
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-08-29 19:56:14 -0400
committerDax Raad <[email protected]>2025-08-29 19:56:29 -0400
commit25e53e090bec1f92fb6b2bbec52f7d1993836972 (patch)
tree7c651fbf53812d53dc97d46bbf8c854754326b4b /cloud/core
parent46927ee9a5830eaf8eaf5bf868a84765586b2b1e (diff)
downloadopencode-25e53e090bec1f92fb6b2bbec52f7d1993836972.tar.gz
opencode-25e53e090bec1f92fb6b2bbec52f7d1993836972.zip
ignore: create key for new workspace
Diffstat (limited to 'cloud/core')
-rw-r--r--cloud/core/src/workspace.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cloud/core/src/workspace.ts b/cloud/core/src/workspace.ts
index 532b22963..8646362a2 100644
--- a/cloud/core/src/workspace.ts
+++ b/cloud/core/src/workspace.ts
@@ -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
})