Skip to content

Move /admin under /api#7

Merged
ambv merged 2 commits intomainfrom
move-admin-under-api
Jun 24, 2025
Merged

Move /admin under /api#7
ambv merged 2 commits intomainfrom
move-admin-under-api

Conversation

@ambv
Copy link
Contributor

@ambv ambv commented Jun 24, 2025

No description provided.

@ambv ambv requested a review from Copilot June 24, 2025 20:57
Copy link
Contributor

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.

Pull Request Overview

This PR moves the API endpoints under the /api namespace to provide a more consistent base URL for all API calls. Key changes include updating the API_BASE constant in multiple frontend files to include "/api", revising all endpoint URLs accordingly, and modifying the backend admin router prefix from "/admin" to "/api/admin".

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/src/lib/api.ts Updates API endpoints to use a centralized API_BASE with "/api"
frontend/src/app/auth/callback/page.tsx Updates API_BASE to include "/api" for authentication callbacks
frontend/src/app/admin/page.tsx Updates API_BASE definition for admin page
frontend/src/app/admin/components/* Updates API_BASE in admin component files
frontend/Dockerfile Sets the build argument for NEXT_PUBLIC_API_BASE with "/api"
backend/app/routers/admin.py Modifies the admin router prefix to "/api/admin"
Comments suppressed due to low confidence (1)

backend/app/routers/admin.py:62

  • Verify that the updated prefix '/api/admin' aligns with the frontend's API calls so that endpoints like '/admin/me' correctly resolve to '/api/admin/me'.
router = APIRouter(prefix="/api/admin", tags=["admin"])

@ambv ambv merged commit 55652b6 into main Jun 24, 2025
1 check passed
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.

3 participants