Openstatus www.openstatus.dev

chore: create page default (#1479)

* chore: create page default

* chore: default config

* chore: docs

authored by

Maximilian Kaske and committed by
GitHub
090ab123 4ee8f50e

+11 -1
+1 -1
apps/docs/src/content/docs/tutorial/how-to-configure-status-page.mdx
··· 16 16 17 17 We are releasing a new version of our status pages. 18 18 19 - <Aside>This is an **opt-in toggle**. We will keep the current status page until next year to allow you migrate or provide any feedback.</Aside> 19 + <Aside>Newly created pages will automatically run on the new version. For old pages, this is an **opt-in toggle**. We will keep the current status page until next year to allow you migrate or provide any feedback.</Aside> 20 20 21 21 You can always have a look how your status page will look like via `https://[slug].stpg.dev`. 22 22
+10
packages/api/src/router/page.ts
··· 569 569 }); 570 570 } 571 571 572 + // REMINDER: default config from legacy page 573 + const defaultConfiguration = { 574 + type: "absolute", 575 + value: "requests", 576 + uptime: true, 577 + theme: "default-rounded", 578 + } satisfies Record<string, string | boolean | undefined>; 579 + 572 580 const newPage = await opts.ctx.db 573 581 .insert(page) 574 582 .values({ ··· 577 585 slug: opts.input.slug, 578 586 description: opts.input.description ?? "", 579 587 icon: opts.input.icon ?? "", 588 + legacyPage: false, 589 + configuration: defaultConfiguration, 580 590 customDomain: "", // TODO: make nullable 581 591 }) 582 592 .returning()