Posts API stage 2: one post at /posts/{id}, no legacy user-posts fallback
- Post detail and map focus load GET /api/v1/posts/{id}
- My posts use only GET /api/v1/users/{id}/posts
- README: requires the stage 2 backend (deploy backend first)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ export default function PostDetailModal({ postId, onClose, onLocationClick, onAu
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const res = await apiFetch(`${API_URL}/api/v1/posts/detail/${postId}`);
|
||||
const res = await apiFetch(`${API_URL}/api/v1/posts/${encodeURIComponent(postId)}`);
|
||||
if (!res.ok) throw new Error("Failed to load post");
|
||||
const data = await res.json();
|
||||
if (!cancelled) {
|
||||
|
||||
Reference in New Issue
Block a user