From 1fa5fbd1a56c465737caed3ef79467fcd938daaf Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 2 Feb 2024 21:03:55 +0300 Subject: [PATCH] lesscode --- src/context/editor.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/context/editor.tsx b/src/context/editor.tsx index 02958b2d..56b875da 100644 --- a/src/context/editor.tsx +++ b/src/context/editor.tsx @@ -124,18 +124,10 @@ export const EditorProvider = (props: { children: JSX.Element }) => { return await apiClient.updateArticle({ shoutId: formToUpdate.shoutId, shoutInput: { - body: formToUpdate.body, + ...formToUpdate, topics: formToUpdate.selectedTopics.map((topic) => topic2topicInput(topic)), // NOTE: first is main - // authors?: InputMaybe>> - // community?: InputMaybe - // mainTopic: topic2topicInput(formToUpdate.mainTopic), - slug: formToUpdate.slug, - subtitle: formToUpdate.subtitle, - title: formToUpdate.title, - lead: formToUpdate.lead, - description: formToUpdate.description, - cover: formToUpdate.coverImageUrl, media: formToUpdate.media, + cover: formToUpdate.coverImageUrl, }, publish, })