18 lines
442 B
JavaScript
18 lines
442 B
JavaScript
export const buildAnalyticsEndpoints = API => ({
|
|
/**
|
|
* Gets the current status of analytics for this environment
|
|
*/
|
|
getAnalyticsStatus: async () => {
|
|
return await API.get({
|
|
url: "/api/bbtel",
|
|
})
|
|
},
|
|
analyticsPing: async ({ source }) => {
|
|
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
return await API.post({
|
|
url: "/api/bbtel/ping",
|
|
body: { source, timezone },
|
|
})
|
|
},
|
|
})
|