Skip to content

feat(UI): add mega API config#1029

Merged
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
Ceron-CSS:main
May 15, 2025
Merged

feat(UI): add mega API config#1029
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
Ceron-CSS:main

Conversation

@Ceron-CSS

Copy link
Copy Markdown
Contributor

No description provided.

@Ceron-CSS Ceron-CSS changed the title feat: add mega API config feat(UI): add mega API config May 15, 2025
@Ceron-CSS
Ceron-CSS requested a review from benjamin-747 May 15, 2025 08:43
@genedna genedna added the ui label May 15, 2025
@genedna genedna modified the milestones: 0.3.0 - Decentralized Git, 0.2.0 - Web UI May 15, 2025
@genedna
genedna requested a review from Copilot May 15, 2025 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds configuration support for the Mega API by introducing a new API URL and client, along with a test page and hook to verify integration.

  • Introduces a new API constant in the config package.
  • Creates a legacy API client in the web utilities.
  • Adds a test page and hook for API connectivity and updates CSP settings in Next.js.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
moon/packages/config/src/index.ts Added LEGACY_API_URL with Mega API configuration for non-production environments.
moon/apps/web/utils/queryClient.ts Imported LEGACY_API_URL and instantiated legacyApiClient for communicating with the Mega API.
moon/apps/web/pages/[org]/testapi/index.tsx Added a new test page to display API test results using the new API endpoint.
moon/apps/web/next.config.js Updated Content Security Policy to include the new API URL.
moon/apps/web/hooks/useTestInfo.ts Added a hook to fetch test API information from the new legacyApiClient.
Comments suppressed due to low confidence (1)

moon/packages/config/src/index.ts:27

  • The constant is named LEGACY_API_URL but the comment refers to it as 'Mega API URL'. Consider renaming the constant to MEGA_API_URL for clarity or updating the comment to match the naming.
// Mega API URL

@benjamin-747
benjamin-747 enabled auto-merge May 15, 2025 09:18
auto-merge was automatically disabled May 15, 2025 09:48

Head branch was pushed to by a user without write access

@vercel

vercel Bot commented May 15, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:57am

@benjamin-747
benjamin-747 added this pull request to the merge queue May 15, 2025
Merged via the queue into gitmono-dev:main with commit da110b9 May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants