diff --git a/src/components/Studio/Mapstories/SettingsModal.tsx b/src/components/Studio/Mapstories/SettingsModal.tsx
index f036b929..6f86942b 100644
--- a/src/components/Studio/Mapstories/SettingsModal.tsx
+++ b/src/components/Studio/Mapstories/SettingsModal.tsx
@@ -81,8 +81,7 @@ export default function SettingsModal({
try {
const updatedStory = await updateStory({
...data,
- // TODO: update again after zod schema change
- visibility: data.visibility === true ? 'PUBLIC' : 'PRIVATE',
+ visibility: data.visibility,
})
toast({
message: t('settingsModal:changesApplied'),
@@ -93,7 +92,6 @@ export default function SettingsModal({
}
setModalOpen(false)
} catch (e) {
- console.log(e)
return toast({
title: t('studio:somethingWrong'),
message: t('settingsModal:changesNotApplied'),
@@ -191,7 +189,7 @@ export default function SettingsModal({
{t('settingsModal:visibility')}
{
@@ -202,7 +200,9 @@ export default function SettingsModal({
onChange(
+ checked ? 'PUBLIC' : 'PRIVATE',
+ )}
ref={ref}
>
diff --git a/src/lib/validations/mapstory.ts b/src/lib/validations/mapstory.ts
index 5d17b06c..d3117729 100644
--- a/src/lib/validations/mapstory.ts
+++ b/src/lib/validations/mapstory.ts
@@ -12,7 +12,7 @@ export const updateMapstorySchema = z.object({
description: z.string(),
author: z.string(),
mode: z.enum([StoryMode.NORMAL, StoryMode.TIMELINE]),
- visibility: z.any(),
+ visibility: z.enum(['PRIVATE', 'PUBLIC']),
themeId: z.string().optional(),
lines: z.boolean(),
})