Skip to content

[codex] Add public mobile API compatibility routes#3

Merged
BunsDev merged 1 commit into
mainfrom
fix-public-api-prefix
May 30, 2026
Merged

[codex] Add public mobile API compatibility routes#3
BunsDev merged 1 commit into
mainfrom
fix-public-api-prefix

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented May 30, 2026

Summary

  • Add /api/public/v1/* read routes expected by the Feedback mobile SDK for posts, boards, comments, changelog, and help content.
  • Map those routes onto the existing public domain/query services and preserve the SDK envelope shapes.
  • Add board ID filtering to the public post query path so boardId works for /api/public/v1/posts.

Root Cause

The deployed backend and current main only exposed the authenticated /api/v1/* API plus portal/server-function paths. The iOS SDK calls /api/public/v1/*, so https://feedback.opencoven.ai/api/public/v1/posts returned the web app 404 HTML instead of JSON.

Test Plan

  • git diff --check
  • bunx vitest run apps/web/src/routes/api/public/v1/posts/__tests__/index.test.ts apps/web/src/routes/api/public/v1/boards/__tests__/index.test.ts 'apps/web/src/routes/api/public/v1/posts/__tests__/$postId.test.ts' 'apps/web/src/routes/api/public/v1/posts/__tests__/$postId.comments.test.ts' apps/web/src/routes/api/public/v1/changelog/__tests__/index.test.ts apps/web/src/routes/api/public/v1/help/__tests__/categories.test.ts 'apps/web/src/routes/api/public/v1/help/articles/__tests__/$slug.test.ts'
  • bunx eslint apps/web/src/lib/server/domains/posts/post.public.ts apps/web/src/routes/api/public/v1/posts/index.ts 'apps/web/src/routes/api/public/v1/posts/$postId.ts' 'apps/web/src/routes/api/public/v1/posts/$postId.comments.ts' apps/web/src/routes/api/public/v1/boards/index.ts apps/web/src/routes/api/public/v1/changelog/index.ts apps/web/src/routes/api/public/v1/help/categories.ts 'apps/web/src/routes/api/public/v1/help/articles/$slug.ts' apps/web/src/routes/api/public/v1/posts/__tests__/index.test.ts 'apps/web/src/routes/api/public/v1/posts/__tests__/$postId.test.ts' 'apps/web/src/routes/api/public/v1/posts/__tests__/$postId.comments.test.ts' apps/web/src/routes/api/public/v1/boards/__tests__/index.test.ts apps/web/src/routes/api/public/v1/changelog/__tests__/index.test.ts apps/web/src/routes/api/public/v1/help/__tests__/categories.test.ts 'apps/web/src/routes/api/public/v1/help/articles/__tests__/$slug.test.ts'
  • bun run typecheck
  • bun run build

Deployment Note

After merge, Railway needs to redeploy feedback.opencoven.ai. Then verify https://feedback.opencoven.ai/api/public/v1/posts returns JSON instead of the web app 404 HTML.

@BunsDev BunsDev marked this pull request as ready for review May 30, 2026 06:14
Copilot AI review requested due to automatic review settings May 30, 2026 06:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@BunsDev BunsDev merged commit a7af695 into main May 30, 2026
1 check failed
@BunsDev BunsDev deleted the fix-public-api-prefix branch May 30, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants