ses sender
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user