feat: add ssh key

This commit is contained in:
Mauricio Siu
2024-10-02 22:50:01 -06:00
parent f13e5d449c
commit d41c8c70c3
24 changed files with 3908 additions and 192 deletions

View File

@@ -12,6 +12,7 @@ export const sshKeys = pgTable("ssh-key", {
.notNull()
.primaryKey()
.$defaultFn(() => nanoid()),
privateKey: text("privateKey").notNull().default(""),
publicKey: text("publicKey").notNull(),
name: text("name").notNull(),
description: text("description"),
@@ -37,6 +38,7 @@ export const apiCreateSshKey = createSchema
.pick({
name: true,
description: true,
privateKey: true,
publicKey: true,
})
.merge(sshKeyCreate.pick({ privateKey: true }));