feat: portfolio editor

This commit is contained in:
DIYgod
2023-08-01 20:49:41 +01:00
parent 16b4c56eee
commit d644b14cf8
9 changed files with 80 additions and 29 deletions
+10
View File
@@ -227,6 +227,7 @@ export function useCreatePage() {
mime_type?: string
}
disableAISummary?: boolean
externalUrl?: string
}) => {
if (!input.characterId) {
throw new Error("characterId is required")
@@ -273,6 +274,7 @@ export function useCreatePage() {
]
: []),
],
external_urls: [input.externalUrl],
} as NoteMetadata & {
summary?: string
},
@@ -313,6 +315,7 @@ export function useUpdatePage() {
mime_type?: string
}
disableAISummary?: boolean
externalUrl?: string
}) => {
if (!input.characterId || !input.noteId) {
throw new Error("characterId and noteId are required")
@@ -407,6 +410,13 @@ export function useUpdatePage() {
})
}
}
if (input.externalUrl) {
if (!metadataDraft.external_urls) {
metadataDraft.external_urls = []
}
metadataDraft.external_urls[0] = input.externalUrl
}
},
},
{