fix: repair version detection platform query format
- Fix GetLatestVersionByTypeAndArch to separate platform/architecture - Query now correctly uses platform='linux' and architecture='amd64' - Resolves UI showing 'no packages available' despite updates existing
This commit is contained in:
@@ -172,6 +172,24 @@ export const agentApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Check if update available for agent
|
||||
checkForUpdateAvailable: async (agentId: string): Promise<{ hasUpdate: boolean; currentVersion: string; latestVersion?: string; reason?: string; platform?: string }> => {
|
||||
const response = await api.get(`/agents/${agentId}/updates/available`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Get update status for agent
|
||||
getUpdateStatus: async (agentId: string): Promise<{ status: string; progress?: number; error?: string }> => {
|
||||
const response = await api.get(`/agents/${agentId}/updates/status`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Generate update nonce for agent (new security feature)
|
||||
generateUpdateNonce: async (agentId: string, targetVersion: string): Promise<{ agent_id: string; target_version: string; update_nonce: string; expires_at: number; expires_in_seconds: number }> => {
|
||||
const response = await api.post(`/agents/${agentId}/update-nonce?target_version=${targetVersion}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Update multiple agents (bulk)
|
||||
updateMultipleAgents: async (updateData: {
|
||||
agent_ids: string[];
|
||||
|
||||
Reference in New Issue
Block a user