feat: implement backend API clients for multi-marketplace integration and frontend service layer
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user