feat: reconcile application vertical slices
Backfill the completed acquisitions, sales, dashboard, pricing, search, public detail, worker, migration, contracts, validation, tests, and implementation-status changes into one verified application slice.
This commit is contained in:
@@ -1,24 +1,35 @@
|
||||
const apiBaseUrl = import.meta.env?.VITE_API_BASE_URL ?? '/api/v1';
|
||||
const apiBaseUrl = import.meta.env?.VITE_API_BASE_URL ?? "/api/v1";
|
||||
|
||||
async function request(path, options = {}) {
|
||||
const response = await fetch(`${apiBaseUrl}${path}`, {
|
||||
credentials: 'include',
|
||||
credentials: "include",
|
||||
...options,
|
||||
headers: { ...(options.body ? { 'content-type': 'application/json' } : {}), ...options.headers },
|
||||
headers: {
|
||||
...(options.body ? { "content-type": "application/json" } : {}),
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
const payload = await response.json().catch(() => null);
|
||||
if (!response.ok) throw new Error(payload?.error?.message ?? 'Provider mapping request failed.');
|
||||
if (!response.ok)
|
||||
throw new Error(
|
||||
payload?.error?.message ?? "Provider mapping request failed.",
|
||||
);
|
||||
return payload?.data;
|
||||
}
|
||||
|
||||
export function listAdminProviderMappings(productId) {
|
||||
return request(`/admin/products/${encodeURIComponent(productId)}/provider-mappings`);
|
||||
return request(
|
||||
`/admin/products/${encodeURIComponent(productId)}/provider-mappings`,
|
||||
);
|
||||
}
|
||||
|
||||
export function createAdminProviderMapping(productId, input, csrfToken) {
|
||||
return request(`/admin/products/${encodeURIComponent(productId)}/provider-mappings`, {
|
||||
method: 'POST',
|
||||
headers: { 'x-csrf-token': csrfToken },
|
||||
body: JSON.stringify(input),
|
||||
});
|
||||
return request(
|
||||
`/admin/products/${encodeURIComponent(productId)}/provider-mappings`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "x-csrf-token": csrfToken },
|
||||
body: JSON.stringify(input),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user