ses sender

This commit is contained in:
2026-04-29 17:14:50 -05:00
parent 479df311ba
commit 3f0e770d21
4 changed files with 381 additions and 66 deletions

View File

@@ -101,11 +101,15 @@ export const billingAPI = {
const qs = params.toString();
return (await api.get(`/api/billing/events${qs ? '?' + qs : ''}`)).data;
},
volume: async ({ domain, ym }) => {
const params = new URLSearchParams();
params.set('domain', domain);
if (ym) params.set('ym', ym);
return (await api.get(`/api/billing/volume?${params.toString()}`)).data;
},
};
export const healthAPI = {
// Read the last persisted status (cheap; used by the banner).
// Returns null if the domain has never been checked.
getStatus: async (domain) => {
try {
return (await api.get(`/api/health/domains/${encodeURIComponent(domain)}`)).data;
@@ -114,7 +118,6 @@ export const healthAPI = {
throw err;
}
},
// Run all checks now and return the full report.
runCheck: async (domain) =>
(await api.post(`/api/health/domains/${encodeURIComponent(domain)}/check`)).data,
};