mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f01a745aad
147 changed files with 1095 additions and 628 deletions
|
|
@ -1,13 +0,0 @@
|
|||
import { NextApiResponse } from 'next';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody, User } from 'lib/types';
|
||||
import { ok } from 'next-basics';
|
||||
|
||||
export default async (
|
||||
req: NextApiRequestQueryBody<unknown, unknown>,
|
||||
res: NextApiResponse<User>,
|
||||
) => {
|
||||
await useAuth(req, res);
|
||||
|
||||
return ok(res, req.auth.user);
|
||||
};
|
||||
|
|
@ -35,7 +35,7 @@ export default async (
|
|||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
if (req.method === 'POST') {
|
||||
if (req.method === 'GET') {
|
||||
if (!(await canViewWebsite(req.auth, websiteId))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
|
|
|||
13
pages/reports/event-data.js
Normal file
13
pages/reports/event-data.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import EventDataReport from 'components/pages/reports/event-data/EventDataReport';
|
||||
import { useMessages } from 'hooks';
|
||||
|
||||
export default function Report() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<AppLayout title={`${formatMessage(labels.eventData)} - ${formatMessage(labels.reports)}`}>
|
||||
<EventDataReport />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import EventDataReport from 'components/pages/reports/EventDataReport';
|
||||
|
||||
export default function Report() {
|
||||
return <EventDataReport />;
|
||||
}
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import FunnelPage from 'components/pages/reports/funnel/FunnelPage';
|
||||
import FunnelReport from 'components/pages/reports/funnel/FunnelReport';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export default function Funnel() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.reports)}`}>
|
||||
<FunnelPage />
|
||||
<AppLayout title={`${formatMessage(labels.funnel)} - ${formatMessage(labels.reports)}`}>
|
||||
<FunnelReport />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import ReportsList from 'components/pages/reports/ReportsList';
|
||||
import ReportList from 'components/pages/reports/ReportList';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export default function ReportsPage() {
|
||||
|
|
@ -7,7 +7,7 @@ export default function ReportsPage() {
|
|||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.reports)}>
|
||||
<ReportsList />
|
||||
<ReportList />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue