fix: Remove /api/ prefix from all API endpoints
- Fixed double /api/api/ issue in production - Updated all API files to remove /api/ prefix since baseURL already includes it - Files fixed: platform.ts, oauth.ts, customDomains.ts, domains.ts, business.ts, sandbox.ts - Production build will need to be rebuilt after pulling these changes
This commit is contained in:
@@ -25,7 +25,7 @@ export interface SandboxResetResponse {
|
||||
* Get current sandbox mode status
|
||||
*/
|
||||
export const getSandboxStatus = async (): Promise<SandboxStatus> => {
|
||||
const response = await apiClient.get<SandboxStatus>('/api/sandbox/status/');
|
||||
const response = await apiClient.get<SandboxStatus>('/sandbox/status/');
|
||||
return response.data;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ export const getSandboxStatus = async (): Promise<SandboxStatus> => {
|
||||
* Toggle between live and sandbox mode
|
||||
*/
|
||||
export const toggleSandboxMode = async (enableSandbox: boolean): Promise<SandboxToggleResponse> => {
|
||||
const response = await apiClient.post<SandboxToggleResponse>('/api/sandbox/toggle/', {
|
||||
const response = await apiClient.post<SandboxToggleResponse>('/sandbox/toggle/', {
|
||||
sandbox: enableSandbox,
|
||||
});
|
||||
return response.data;
|
||||
@@ -43,6 +43,6 @@ export const toggleSandboxMode = async (enableSandbox: boolean): Promise<Sandbox
|
||||
* Reset sandbox data to initial state
|
||||
*/
|
||||
export const resetSandboxData = async (): Promise<SandboxResetResponse> => {
|
||||
const response = await apiClient.post<SandboxResetResponse>('/api/sandbox/reset/');
|
||||
const response = await apiClient.post<SandboxResetResponse>('/sandbox/reset/');
|
||||
return response.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user