Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Merge branch 'main' into fix-captcha-inherit

Andrii Romasiun3f892a4add53
diff --cc src/api/index.ts
index b96b5e52c,64a4bda83..4bcc9168a
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@@ -866,24 -866,16 +866,38 @@@ export const processSSOToken = (token:
: error.response.data.message
})
+export const getProjectsNames = () =>
+ api
+ .get('project/names')
+ .then((response): IProjectNames[] => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message)
+ ? error.response.data
+ : error.response.data.message
+ })
+
+export const createCaptchaInherited = (id: string) =>
+ api
+ .put(`project/captcha/inherited/${id}`)
+ .then((response): IProject => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message)
+ ? error.response.data
+ : error.response.data.message
+ })
++
+ export const deletePartially = (id: string, data: {
+ from: string
+ to: string
+ }) =>
+ api
+ .delete(`project/partially/${id}?from=${data.from}&to=${data.to}`)
+ .then((response) => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message)
+ ? error.response.data
+ : error.response.data.message
+ })