Commit
·
0a9fc16
1
Parent(s):
c8c5d70
fixup! ♿️ No-JS ethics modal (#166)
Browse files
src/routes/settings/+page.server.ts
CHANGED
|
@@ -17,8 +17,10 @@ export const actions = {
|
|
| 17 |
ethicsModalAccepted: z.boolean({ coerce: true }).optional(),
|
| 18 |
})
|
| 19 |
.parse({
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
});
|
| 23 |
|
| 24 |
await collections.settings.updateOne(
|
|
|
|
| 17 |
ethicsModalAccepted: z.boolean({ coerce: true }).optional(),
|
| 18 |
})
|
| 19 |
.parse({
|
| 20 |
+
// `undefined` is important here vs `null`, otherwise `.default()` will not work
|
| 21 |
+
shareConversationsWithModelAuthors:
|
| 22 |
+
formData.get("shareConversationsWithModelAuthors") ?? undefined,
|
| 23 |
+
ethicsModalAccepted: formData.get("ethicsModalAccepted") ?? undefined,
|
| 24 |
});
|
| 25 |
|
| 26 |
await collections.settings.updateOne(
|