Updates the packages and the banner live in the browser
The build still bakes the current packages and the active banner into the HTML. After hydration the page asks /api/v1/offerings and /api/v1/offerings/banner once and replaces what differs; errors and time-outs keep what was baked, and a 204 from the banner route hides the banner. The banner is now the OfferingBanner contract (title, text, optional link) instead of layout=banner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -669,6 +669,9 @@ describe('startPreviewServer', () => {
|
||||
expect(
|
||||
(await ask(port, '/api/v1/contact-messages', 'POST')).status,
|
||||
).toBe(202);
|
||||
// Live pakketten: geen gegevens, zonder 404
|
||||
expect((await ask(port, '/api/v1/offerings')).status).toBe(204);
|
||||
expect((await ask(port, '/api/v1/offerings/banner')).status).toBe(204);
|
||||
// Al het andere blijft zoals het was
|
||||
expect((await ask(port, '/api/v1/andere')).status).toBe(404);
|
||||
expect((await ask(port, '/api/v1/contact-messages')).status).toBe(404);
|
||||
|
||||
Reference in New Issue
Block a user