Skip to content

chore(frontend): adopt getApiBase() in remaining 7 SecretsApiClient.js paths #3746

@mrveiss

Description

@mrveiss

Problem

PR #3729 converted 3 of 10 hardcoded /api/ paths in autobot-frontend/src/utils/SecretsApiClient.js. Seven paths remain hardcoded:

  • Line 38: /api/secrets/?...
  • Line 53: /api/secrets/${secretId}...
  • Line 82: /api/secrets/${secretId}... (PUT)
  • Line 97: /api/secrets/${secretId}... (DELETE)
  • Line 112: /api/secrets/transfer...
  • Line 121: /api/secrets/chat/${chatId}/cleanup
  • Line 136: /api/secrets/chat/${chatId}... (DELETE)

Fix

Replace all remaining hardcoded '/api/' with ``${getApiBase()}/``` — getApiBase() is already imported after PR #3729.

Why

Hardcoded paths break deployments where the frontend is served under a non-root path (VITE_API_BASE_PATH env override). Discovered during PR #3729 review.

Discovered in session implementing #3725.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions