feat: implement backend API clients for multi-marketplace integration and frontend service layer

This commit is contained in:
2026-05-12 13:16:14 +03:00
parent 6974af486a
commit ee39a3d83b
65 changed files with 2501 additions and 33 deletions

View File

@@ -52,3 +52,18 @@ export async function listFiles(caseId) {
const res = await fetch(`${API_BASE}/cases/${caseId}/files`);
return await res.json();
}
export async function getConfiguredPlatforms() {
const res = await fetch(`${API_BASE}/credentials`);
const data = await res.json();
return data.configured_platforms || [];
}
export async function saveCredentials(platform, data) {
const res = await fetch(`${API_BASE}/credentials/${platform}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(data),
});
return await res.json();
}