Skip to content

Commit

Permalink
chore: repo overall update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Nov 15, 2024
1 parent 549e74d commit 4050a23
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
19 changes: 19 additions & 0 deletions packages/canyon-platform/app/api/project/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// export const dynamic = 'force-static'
// import prisma from "@/lib/prisma";
// import {decompressedData} from "@/utils/zstd";

export async function GET() {


return Response.json({
data:[
{
id:'id',
pathWithNamespace:'canyon/canyon',
description:'sss',
lastReported:'2024-04-30'
}
]
})

}
4 changes: 2 additions & 2 deletions packages/canyon-platform/app/api/user/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import prisma from "@/lib/prisma";

export async function GET() {
const users = await prisma.user.findMany();
// const users = await prisma.user.findMany();

return Response.json({ data:users })
return Response.json({ data:[] })
}
22 changes: 14 additions & 8 deletions packages/canyon-platform/app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,33 @@ const fetcher = (url) => axios(url).then((res) => res.data);

const columns = [
{
title: '姓名',
dataIndex: 'username',
key: 'name',
title: 'ID',
dataIndex: 'id',
key: 'id',
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
title: 'Repo',
dataIndex: 'pathWithNamespace',
key: 'pathWithNamespace',
},
{
title: '住址',
title: 'Org',
dataIndex: 'address',
key: 'address',
},
{
title: 'Last Reported',
dataIndex: 'address',
key: 'address',
},
// Last Reported
];
const ProjectsPage = () => {
const { token } = useToken();
// const users = await prisma.user.findMany();
// console.log(users.length);
const { data, error, isLoading } = useSWR(
"/api/user",
"/api/project",
fetcher
);

Expand Down

0 comments on commit 4050a23

Please sign in to comment.