Skip to content

Commit

Permalink
fix: show database id and account id for cloudflare edit connection
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Jul 27, 2024
1 parent f838eaa commit 37599c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/api/database/[database_id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const databaseSchema = zod.object({
description: zod.string(),
label: zod.enum(["gray", "red", "yellow", "green", "blue"]),
config: zod.object({
url: zod.string().min(5),
url: zod.string().optional(),
token: zod.string().optional(),
username: zod.string().optional(),
password: zod.string().optional(),
Expand Down
5 changes: 2 additions & 3 deletions src/app/connect/saved-connection-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ export default function ConnectionDialogContent({
<span>{title}</span>
</div>
</DialogTitle>
<DialogDescription>
<div className="flex flex-col gap-4 text-foreground">{children}</div>
</DialogDescription>
<DialogDescription />
<div className="flex flex-col gap-4 text-foreground">{children}</div>
</DialogContent>
</Dialog>
);
Expand Down
7 changes: 7 additions & 0 deletions src/app/connect/saved-edit-connection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ function EditRemote({
config: {
url: r.config.url,
token: r.config.token,
username: r.config.username,
database: r.config.database,
},
});
})
Expand All @@ -62,6 +64,8 @@ function EditRemote({
return <div>Something wrong.</div>;
}

console.log("sss", initialData);

return (
<SavedConnectionConfig
driver={initialData.driver ?? "turso"}
Expand All @@ -79,6 +83,9 @@ function EditRemote({
config: {
token: conn.config.token,
url: conn.config.url,
password: conn.config.password,
username: conn.config.username,
database: conn.config.database,
},
})
.then(() => {
Expand Down

0 comments on commit 37599c2

Please sign in to comment.