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:
SlimusMinus
2026-10-21 00:05:20 +03:00
parent d09c2c71ce
commit ec713f3da1
4 changed files with 19 additions and 32 deletions

View File

@@ -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) {