2
0

feat(db): 🗃️ Remove duplicate fields in PublicTypebot

This commit is contained in:
Baptiste Arnaud
2022-06-04 11:05:46 +02:00
parent 8ec117aee4
commit ad32ae02ef
11 changed files with 29 additions and 47 deletions

View File

@ -9,12 +9,9 @@ export const parseTypebotToPublicTypebot = (
typebotId: typebot.id,
blocks: typebot.blocks,
edges: typebot.edges,
name: typebot.name,
publicId: typebot.publicId,
settings: typebot.settings,
theme: typebot.theme,
variables: typebot.variables,
customDomain: typebot.customDomain,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
})
@ -26,12 +23,12 @@ export const parsePublicTypebotToTypebot = (
id: typebot.typebotId,
blocks: typebot.blocks,
edges: typebot.edges,
name: typebot.name,
publicId: typebot.publicId,
name: existingTypebot.name,
publicId: existingTypebot.publicId,
settings: typebot.settings,
theme: typebot.theme,
variables: typebot.variables,
customDomain: typebot.customDomain,
customDomain: existingTypebot.customDomain,
createdAt: existingTypebot.createdAt,
updatedAt: existingTypebot.updatedAt,
publishedTypebotId: typebot.id,