Skip to content

Extract Nuxt SDK API route paths into shared constants #5060

Description

@coderabbitai

Summary

Extract the Nuxt SDK API route paths into shared constants.

Rationale

ThunderIDRoot uses route string literals for the profile endpoint. Shared constants reduce repeated route strings and prevent route updates from becoming inconsistent across Nuxt runtime modules.

Affected areas

  • packages/nuxt/src/runtime/components/ThunderIDRoot.ts
  • Other Nuxt runtime components, plugins, middleware, and Nitro handlers that use the same /api/auth/* route paths

Required changes

  1. Define and export shared constants for Nuxt SDK API route paths.
  2. Replace repeated route string literals with the shared constants.
  3. Keep the constants in the appropriate Nuxt package layer. Do not duplicate them across runtime modules.
  4. Preserve the current request methods and route behavior.

Acceptance criteria

  • Nuxt API route paths used by more than one runtime module resolve through shared constants.
  • ThunderIDRoot uses the shared constants for profile fetch and profile update requests.
  • No duplicate or inconsistent route path literals remain in the affected Nuxt runtime modules.
  • The changes meet the repository ESLint and Prettier requirements.

Backlinks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions