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 feature/secure-website

Andrii Romasiun2017ba4becae
diff --cc src/api/index.ts
index 226d05024,0f0b743ff..c1a9eba36
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@@ -994,17 -961,24 +1011,39 @@@ export const getUserFlow =
: error.response.data.message
})
+export const checkPassword = (pid: string, password: string) =>
+ api
+ .get(`project/password/${pid}`, {
+ headers: {
+ password,
+ },
+ })
+ .then((response): Boolean => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message)
+ ? error.response.data
+ : error.response.data.message
+ })
++
+ export const getPaymentMetainfo = () =>
+ api
+ .get('user/metainfo')
+ .then((response) => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message)
+ ? error.response.data
+ : error.response.data.message
+ })
+
+ export const getUsageInfo = () =>
+ api
+ .get('user/usageinfo')
+ .then((response) => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message)
+ ? error.response.data
+ : error.response.data.message
+ })