Browse Source

refactor: return 418 on root endpoint instead of API guide

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kotoyuuko 3 days ago
parent
commit
7dea087d80
3 changed files with 1 additions and 10 deletions
  1. 0 1
      CLAUDE.md
  2. 0 1
      README.md
  3. 1 8
      src/index.ts

+ 0 - 1
CLAUDE.md

@@ -44,7 +44,6 @@ Hourly at minute 0 (`0 * * * *`).
 |----------|-------------|
 | `/convert?from=USD&to=CNY&amount=100` | Convert currency (data from Notion database) |
 | `/sync` | Manually trigger exchange rate sync from OXR to Notion |
-| `/` | Info page |
 
 ### Environment Variables (Secrets)
 

+ 0 - 1
README.md

@@ -90,7 +90,6 @@ wrangler secret put NOTION_DATABASE_ID
 
 | Endpoint | Method | Description |
 |----------|--------|-------------|
-| `/` | GET | Info page |
 | `/convert` | GET | Convert currency |
 | `/sync` | GET | Sync rates to Notion |
 

+ 1 - 8
src/index.ts

@@ -355,14 +355,7 @@ export default {
     }
 
     // Home page
-    return new Response(
-      `Notion Exchange Rate Worker
-
-API Endpoints:
-  GET /convert?from=USD&to=CNY&amount=100  - Convert currency
-  GET /sync                                - Sync rates to Notion`,
-      { headers: { 'Content-Type': 'text/plain' } }
-    );
+    return new Response("I'm a teapot", { status: 418 });
   },
 
   async scheduled(event, env, ctx): Promise<void> {