From 4ab34c8f0f9b4e1f636a26012f2a75863b471c51 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Fri, 15 May 2026 00:22:37 +0900 Subject: Fix build: merge detail/update into existing API routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parametric resource routes cause a React Router prod build error (commonjs--resolver server-only module conflict). Merged the GET?id= and PATCH logic into the existing api-bands.tsx and api-artists.tsx instead of creating separate :uuid route files. - GET /api/bands?id=UUID → band detail with links/members - PATCH /api/bands → partial update (append_links, append_members) - Same pattern for /api/artists Co-Authored-By: Claude Sonnet 4.6 --- .claude/skills/update-band-info.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.claude/skills/update-band-info.md') diff --git a/.claude/skills/update-band-info.md b/.claude/skills/update-band-info.md index ebe80f7..f595362 100644 --- a/.claude/skills/update-band-info.md +++ b/.claude/skills/update-band-info.md @@ -37,7 +37,7 @@ print(json.dumps(matches, ensure_ascii=False, indent=2)) ### Step 2: バンドの現在データを取得する ```bash -curl -s "https://whoisband.yyamashita.com/api/bands/{uuid}" +curl -s "https://whoisband.yyamashita.com/api/bands?id={uuid}" ``` レスポンスから以下を確認: @@ -101,7 +101,7 @@ curl -s "https://whoisband.yyamashita.com/api/artists" 1. **SNS URL が一致** → 同一アーティストと断定 - 既存アーティストのリンク一覧と比較 - - `curl -s "https://whoisband.yyamashita.com/api/artists/{uuid}"` で各アーティストのリンクを確認 + - `curl -s "https://whoisband.yyamashita.com/api/artists?id={uuid}"` で各アーティストのリンクを確認 2. **名前が完全一致** → 同一アーティストと断定 3. **名前が部分一致または表記ゆれ** → スキップ(あいまいな場合は追加しない) 4. **一致なし** → 新規アーティストとして登録 @@ -132,9 +132,10 @@ bio / 固定投稿 / プロフィール情報からパートを読み取る。 ### Step 6: バンドを更新する ```bash -curl -s -X PATCH "https://whoisband.yyamashita.com/api/bands/{uuid}" \ +curl -s -X PATCH "https://whoisband.yyamashita.com/api/bands" \ -H "Content-Type: application/json" \ -d '{ + "id": "{uuid}", "description": "SNSから取得した説明文", "append_links": true, "links": [ -- cgit v1.2.3