From 6b43a21b51d70327c0a7c0b098596c36884bb374 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 1 Sep 2023 12:35:38 +0200 Subject: [PATCH 1/2] Uppercase endpoint examples in adapter READMEs --- packages/integrations/cloudflare/README.md | 2 +- packages/integrations/netlify/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integrations/cloudflare/README.md b/packages/integrations/cloudflare/README.md index 25cd7c3764e6..99b2d75282c5 100644 --- a/packages/integrations/cloudflare/README.md +++ b/packages/integrations/cloudflare/README.md @@ -99,7 +99,7 @@ From an endpoint: ```js // src/pages/api/someFile.js -export function get(context) { +export function GET(context) { const runtime = context.locals.runtime; return new Response('Some body'); diff --git a/packages/integrations/netlify/README.md b/packages/integrations/netlify/README.md index c29d2d126cc8..a313486dc830 100644 --- a/packages/integrations/netlify/README.md +++ b/packages/integrations/netlify/README.md @@ -243,7 +243,7 @@ We check for common mime types for audio, image, and video files. To include spe import fs from 'node:fs'; -export function get() { +export function GET() { const buffer = fs.readFileSync('../image.jpg'); // Return the buffer directly, @astrojs/netlify will base64 encode the body From 73a70a201dcf90a5cec07ac4dcbed1f91d8bbe67 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 1 Sep 2023 12:38:24 +0200 Subject: [PATCH 2/2] Add changeset --- .changeset/quiet-sheep-refuse.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/quiet-sheep-refuse.md diff --git a/.changeset/quiet-sheep-refuse.md b/.changeset/quiet-sheep-refuse.md new file mode 100644 index 000000000000..3660e03fce72 --- /dev/null +++ b/.changeset/quiet-sheep-refuse.md @@ -0,0 +1,6 @@ +--- +'@astrojs/cloudflare': patch +'@astrojs/netlify': patch +--- + +Update README