feat: add pricing job activity view
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-09 17:39:08 -04:00
parent af563b691d
commit 22d13af604
7 changed files with 109 additions and 2 deletions
@@ -0,0 +1,23 @@
const apiBaseUrl = import.meta.env?.VITE_API_BASE_URL ?? '/api/v1';
async function request(path, options = {}) {
const response = await fetch(`${apiBaseUrl}${path}`, {
credentials: 'include',
...options,
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 ?? 'Job request failed.');
return payload?.data;
}
export function listAdminPricingJobs() {
return request('/admin/jobs');
}
export function retryAdminPricingJob(jobId, csrfToken) {
return request(`/admin/jobs/${encodeURIComponent(jobId)}/retry`, {
method: 'POST',
headers: { 'x-csrf-token': csrfToken },
});
}