mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fixed reports fetch.
This commit is contained in:
parent
bac3ab2c1a
commit
8a13e2c70a
2 changed files with 3 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ import { getReports, createReport } from '@/queries/prisma';
|
||||||
|
|
||||||
export async function GET(request: Request) {
|
export async function GET(request: Request) {
|
||||||
const schema = z.object({
|
const schema = z.object({
|
||||||
websiteId: z.uuid().optional(),
|
websiteId: z.uuid(),
|
||||||
type: z.string().optional(),
|
type: z.string().optional(),
|
||||||
...pagingParams,
|
...pagingParams,
|
||||||
});
|
});
|
||||||
|
|
@ -26,7 +26,7 @@ export async function GET(request: Request) {
|
||||||
search,
|
search,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (websiteId && !(await canViewWebsite(auth, websiteId))) {
|
if (!(await canViewWebsite(auth, websiteId))) {
|
||||||
return unauthorized();
|
return unauthorized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { SharePage } from './SharePage';
|
import { SharePage } from './SharePage';
|
||||||
|
|
||||||
export default async function ({ params }: { params: Promise<{ shareId: string }> }) {
|
export default async function ({ params }: { params: Promise<{ shareId: string[] }> }) {
|
||||||
const { shareId } = await params;
|
const { shareId } = await params;
|
||||||
|
|
||||||
return <SharePage shareId={shareId[0]} />;
|
return <SharePage shareId={shareId[0]} />;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue