refactor(frontend): Remove '/api' prefix from all API calls to align with backend URL convention

- Updated all API endpoint strings in 'frontend/src' (via sed and manual fixes) to remove the '/api/' prefix.
- Manually fixed 'Timeline.tsx' absolute URLs to use the 'api' subdomain and correct path.
- Manually fixed 'useAuth.ts' logout fetch URLs.
- Updated 'HelpApiDocs.tsx' sandbox URL.
- This change, combined with the backend URL update, fully transitions the application to use subdomain-based routing (e.g., 'http://api.lvh.me:8000/resource/') instead of path-prefix routing (e.g., 'http://api.lvh.me:8000/api/resource/').
This commit is contained in:
poduck
2025-12-01 02:14:17 -05:00
parent 92724d03b6
commit b3e2c1f324
19 changed files with 92 additions and 82 deletions

View File

@@ -41,7 +41,7 @@ const LANGUAGES: Record<CodeLanguage, LanguageConfig> = {
// Default test credentials (used when no tokens are available)
const DEFAULT_TEST_API_KEY = 'ss_test_<your_test_token_here>';
const DEFAULT_TEST_WEBHOOK_SECRET = 'whsec_test_abc123def456ghi789jkl012mno345pqr678';
const SANDBOX_URL = 'https://sandbox.smoothschedule.com/api/v1';
const SANDBOX_URL = 'https://sandbox.smoothschedule.com/v1';
// Multi-language code interface
interface MultiLangCode {
@@ -1111,7 +1111,7 @@ my $response = $ua->get('${SANDBOX_URL}/services/',
)}
<a
href="/api/v1/docs/"
href="/v1/docs/"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 px-4 py-2 text-sm font-medium text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20 rounded-lg transition-colors"