Fixed reports fetch.
This commit is contained in:
@@ -8,7 +8,7 @@ import { getReports, createReport } from '@/queries/prisma';
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const schema = z.object({
|
||||
websiteId: z.uuid().optional(),
|
||||
websiteId: z.uuid(),
|
||||
type: z.string().optional(),
|
||||
...pagingParams,
|
||||
});
|
||||
@@ -26,7 +26,7 @@ export async function GET(request: Request) {
|
||||
search,
|
||||
};
|
||||
|
||||
if (websiteId && !(await canViewWebsite(auth, websiteId))) {
|
||||
if (!(await canViewWebsite(auth, websiteId))) {
|
||||
return unauthorized();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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;
|
||||
|
||||
return <SharePage shareId={shareId[0]} />;
|
||||
|
||||
Reference in New Issue
Block a user