📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
overvall for captcha projects
kruzhambus90e7f1a12ea4
diff --git a/src/api/index.js b/src/api/index.jsindex b9db7085d..b50ba4922 100644--- a/src/api/index.js+++ b/src/api/index.js@@ -359,6 +359,17 @@ export const getOverallStats = (pids) =>: error.response.data.message})+export const getOverallStatsCaptcha = (pids) =>+ api+ .get(`log/captcha/birdseye?pids=[${_map(pids, (pid) => `"${pid}"`).join(',')}]`)+ .then((response) => response.data)+ .catch((error) => {+ debug('%s', error)+ throw _isEmpty(error.response.data?.message)+ ? error.response.data+ : error.response.data.message+ })+export const getLiveVisitors = (pids) =>api.get(`log/hb?pids=[${_map(pids, (pid) => `"${pid}"`).join(',')}]`)diff --git a/src/pages/Dashboard/Dashboard.jsx b/src/pages/Dashboard/Dashboard.jsxindex b83d1d07c..15685e9cf 100644--- a/src/pages/Dashboard/Dashboard.jsx+++ b/src/pages/Dashboard/Dashboard.jsx@@ -40,6 +40,7 @@ const ProjectCart = ({}) => {const statsDidGrowUp = overall?.percChange >= 0const [showInviteModal, setShowInviteModal] = useState(false)+ console.log(overall)const onAccept = async () => {const pid = _find(sharedProjects, item => item.project.id === id).iddiff --git a/src/redux/sagas/ui/load_projects.js b/src/redux/sagas/ui/load_projects.jsindex 21b6912d8..74bac29a4 100644--- a/src/redux/sagas/ui/load_projects.js+++ b/src/redux/sagas/ui/load_projects.js@@ -7,7 +7,7 @@ import UIActions from 'redux/actions/ui'import { ENTRIES_PER_PAGE_DASHBOARD } from 'redux/constants'import {- getProjects, getOverallStats, getLiveVisitors,+ getProjects, getOverallStats, getLiveVisitors, getOverallStatsCaptcha,} from '../../../api'const debug = Debug('swetrix:rx:s:load-projects')@@ -29,12 +29,11 @@ export default function* loadProjects({ payload: { take = ENTRIES_PER_PAGE_DASHBlet overallif (isCaptcha) {- // try {- // overall = yield call(getOverallStats, pids, true)- // } catch (e) {- // debug('failed to overall stats: %s', e)- // }- overall = {}+ try {+ overall = yield call(getOverallStatsCaptcha, pids)+ } catch (e) {+ debug('failed to overall stats: %s', e)+ }} else {try {overall = yield call(getOverallStats, pids)