Skip to content

fix: Multiple API routes use hardcoded mock data instead of database queries #51

@qianghan

Description

@qianghan

Several Next.js API routes return hardcoded mock data instead of querying the database, even though Prisma models exist for the data. This was the same class of bug as #48 (capacity planner).

Routes with DB models that use mock data instead:

  1. developer/models/route.ts - Uses hardcoded models from @/lib/data/developer-models instead of querying DevApiAIModel
  2. developer/models/[id]/route.ts - Same issue
  3. developer/models/[id]/gateways/route.ts - Uses mock data instead of DevApiGatewayOffer
  4. integrations/route.ts - Returns hardcoded INTEGRATIONS array instead of querying IntegrationConfig

Routes with mock data but NO DB model (lower priority, left as-is):

  • network-analytics/* routes (4 routes) - No DB models, display analytics
  • orchestrator-manager/orchestrators/route.ts - No DB model
  • releases/route.ts - No DB model (future: GitHub API)
  • plugin-publisher/stats/[packageName]/route.ts - Fake timeline

Fix: Migrate the 4 high-priority routes to use Prisma queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions