Skip to content

Commit 4275004

Browse files
committed
fix(community-poi): default acceptsContributions to true
`acceptsContributions: z.boolean().optional()` was stored as `false` when the field was absent from frontmatter, so @nuxt/content's generated column made every POI evaluate `acceptsContributions === false` — flagging all three real community projects as "showcase only" with the lock badge on the overview. Switch to `z.boolean().default(true)`: the SQL column is now `BOOLEAN DEFAULT true`, so a POI is community-contributable unless it explicitly opts out with `acceptsContributions: false`. Verified the rebuilt content DB stores `true` for all three POIs (de + en). https://claude.ai/code/session_01TWED5ZjQD6uv434RqTBaY2
1 parent 15037cd commit 4275004

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

content.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ const communityPoiSchema = withI18nMeta(z.object({
238238
startedAt: z.coerce.date().optional(),
239239
updatedAt: z.coerce.date().optional(),
240240
forumUrl: z.string().url().optional(),
241-
acceptsContributions: z.boolean().optional()
241+
// Defaults to true: a POI is community-contributable unless it explicitly
242+
// opts out. An `.optional()` boolean gets stored as `false` when absent,
243+
// which would wrongly flag every POI as showcase-only.
244+
acceptsContributions: z.boolean().default(true)
242245
}))
243246

244247
export default defineContentConfig({

0 commit comments

Comments
 (0)