|
|
@@ -77,7 +77,7 @@ export const platformListTool = async (args: PlatformListInput) => {
|
|
|
};
|
|
|
|
|
|
// Custom route uses getAllPlatforms endpoint
|
|
|
- const response = await apiClient.get<{ data: Platform[]; total: number }>('/api/v1/platforms/getAllPlatforms', params);
|
|
|
+ const response = await apiClient.get<{ data: Platform[]; total: number }>('/api/v1/platform/getAllPlatforms', params);
|
|
|
|
|
|
const platforms = response.data || [];
|
|
|
const total = response.total || 0;
|
|
|
@@ -138,7 +138,7 @@ export const platformGetTool = async (args: PlatformGetInput) => {
|
|
|
|
|
|
try {
|
|
|
const { id } = args;
|
|
|
- const response = await apiClient.get<Platform>(`/api/v1/platforms/getPlatform/${id}`);
|
|
|
+ const response = await apiClient.get<Platform>(`/api/v1/platform/getPlatform/${id}`);
|
|
|
|
|
|
const platform = response;
|
|
|
|
|
|
@@ -176,7 +176,7 @@ export const platformCreateTool = async (args: PlatformCreateInput) => {
|
|
|
const apiClient = getApiClient();
|
|
|
|
|
|
try {
|
|
|
- const response = await apiClient.post<Platform>('/api/v1/platforms/createPlatform', args);
|
|
|
+ const response = await apiClient.post<Platform>('/api/v1/platform/createPlatform', args);
|
|
|
|
|
|
const platform = response;
|
|
|
|
|
|
@@ -214,7 +214,7 @@ export const platformUpdateTool = async (args: PlatformUpdateInput) => {
|
|
|
|
|
|
try {
|
|
|
const { id, ...updateData } = args;
|
|
|
- const response = await apiClient.post<Platform>('/api/v1/platforms/updatePlatform', { id, ...updateData });
|
|
|
+ const response = await apiClient.post<Platform>('/api/v1/platform/updatePlatform', { id, ...updateData });
|
|
|
|
|
|
const platform = response;
|
|
|
|
|
|
@@ -252,7 +252,7 @@ export const platformDeleteTool = async (args: PlatformDeleteInput) => {
|
|
|
|
|
|
try {
|
|
|
const { id } = args;
|
|
|
- await apiClient.post<{ success: boolean }>('/api/v1/platforms/deletePlatform', { id });
|
|
|
+ await apiClient.post<{ success: boolean }>('/api/v1/platform/deletePlatform', { id });
|
|
|
|
|
|
const markdown = `✅ **Platform Deleted Successfully**\n\nPlatform ID ${id} has been deleted.`;
|
|
|
|
|
|
@@ -283,7 +283,7 @@ export const platformToggleStatusTool = async (args: PlatformToggleStatusInput)
|
|
|
|
|
|
try {
|
|
|
const { id } = args;
|
|
|
- const response = await apiClient.post<Platform>('/api/v1/platforms/togglePlatformStatus', { id });
|
|
|
+ const response = await apiClient.post<Platform>('/api/v1/platform/togglePlatformStatus', { id });
|
|
|
|
|
|
const platform = response;
|
|
|
|