Skip to content

Commit 82509e8

Browse files
author
Frank
committed
wip: zen
1 parent e7b6ffb commit 82509e8

8 files changed

Lines changed: 778 additions & 43 deletions

File tree

packages/console/app/src/routes/workspace/key-section.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { withActor } from "~/context/auth.withActor"
66
import { createStore } from "solid-js/store"
77
import { formatDateUTC, formatDateForTable } from "./common"
88
import styles from "./key-section.module.css"
9+
import { Actor } from "@opencode/console-core/actor.js"
910

1011
const removeKey = action(async (form: FormData) => {
1112
"use server"
@@ -25,7 +26,10 @@ const createKey = action(async (form: FormData) => {
2526
return json(
2627
await withActor(
2728
() =>
28-
Key.create({ name })
29+
Key.create({
30+
userID: Actor.assert("user").properties.userID,
31+
name,
32+
})
2933
.then((data) => ({ error: undefined, data }))
3034
.catch((e) => ({ error: e.message as string })),
3135
workspaceID,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE `key` MODIFY COLUMN `user_id` varchar(30) NOT NULL;--> statement-breakpoint
2+
ALTER TABLE `key` DROP COLUMN `actor`;--> statement-breakpoint
3+
ALTER TABLE `key` DROP COLUMN `old_name`;

0 commit comments

Comments
 (0)