diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts new file mode 100644 index 0000000..0eebb94 --- /dev/null +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -0,0 +1,2 @@ +import { handlers } from "@/auth" +export const { GET, POST } = handlers \ No newline at end of file diff --git a/src/app/api/image/[...key]/route.ts b/src/app/api/image/[...key]/route.ts new file mode 100644 index 0000000..3f75627 --- /dev/null +++ b/src/app/api/image/[...key]/route.ts @@ -0,0 +1,33 @@ +import { s3 } from "@/lib/s3"; +import { GetObjectCommand } from "@aws-sdk/client-s3"; + +export async function GET(req: Request, { params }: { params: { key: string[] } }) { + const { key } = await params; + const s3Key = key.join("/"); + + try { + const command = new GetObjectCommand({ + Bucket: "gaertan", + Key: s3Key, + }); + + const response = await s3.send(command); + + if (!response.Body) { + return new Response("No body", { status: 500 }); + } + + const contentType = response.ContentType ?? "application/octet-stream"; + + return new Response(response.Body as ReadableStream, { + headers: { + "Content-Type": contentType, + "Cache-Control": "public, max-age=3600", + "Content-Disposition": "inline", // use 'attachment' to force download + }, + }); + } catch (err) { + console.log(err) + return new Response("Image not found", { status: 404 }); + } +} \ No newline at end of file diff --git a/src/app/commissions/board/page.tsx b/src/app/commissions/board/page.tsx new file mode 100644 index 0000000..fcdd7e6 --- /dev/null +++ b/src/app/commissions/board/page.tsx @@ -0,0 +1,5 @@ +export default function CommissionsBoardPage() { + return ( +
CommissionsBoardPage
+ ); +} \ No newline at end of file diff --git a/src/app/commissions/types/[id]/page.tsx b/src/app/commissions/types/[id]/page.tsx new file mode 100644 index 0000000..80733fa --- /dev/null +++ b/src/app/commissions/types/[id]/page.tsx @@ -0,0 +1,5 @@ +export default function CommissionsTypesEditPage() { + return ( +
CommissionsTypesEditPage
+ ); +} \ No newline at end of file diff --git a/src/app/commissions/types/new/page.tsx b/src/app/commissions/types/new/page.tsx new file mode 100644 index 0000000..6b92078 --- /dev/null +++ b/src/app/commissions/types/new/page.tsx @@ -0,0 +1,5 @@ +export default function CommissionsTypesNewPage() { + return ( +
CommissionsTypesNewPage
+ ); +} \ No newline at end of file diff --git a/src/app/commissions/types/page.tsx b/src/app/commissions/types/page.tsx new file mode 100644 index 0000000..c39ad62 --- /dev/null +++ b/src/app/commissions/types/page.tsx @@ -0,0 +1,5 @@ +export default function CommissionsTypesPage() { + return ( +
CommissionsTypesPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/categories/[id]/page.tsx b/src/app/portfolio/categories/[id]/page.tsx new file mode 100644 index 0000000..86195c2 --- /dev/null +++ b/src/app/portfolio/categories/[id]/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioCategoriesEditPage() { + return ( +
PortfolioCategoriesEditPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/categories/new/page.tsx b/src/app/portfolio/categories/new/page.tsx new file mode 100644 index 0000000..f5d8e51 --- /dev/null +++ b/src/app/portfolio/categories/new/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioCategoriesNewPage() { + return ( +
PortfolioCategoriesNewPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/categories/page.tsx b/src/app/portfolio/categories/page.tsx new file mode 100644 index 0000000..c355c7b --- /dev/null +++ b/src/app/portfolio/categories/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioCategoriesPage() { + return ( +
PortfolioCategoriesPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/images/[id]/page.tsx b/src/app/portfolio/images/[id]/page.tsx new file mode 100644 index 0000000..3fdf030 --- /dev/null +++ b/src/app/portfolio/images/[id]/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioImagesEditPage() { + return ( +
PortfolioImagesEditPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/images/new/page.tsx b/src/app/portfolio/images/new/page.tsx new file mode 100644 index 0000000..b7dff62 --- /dev/null +++ b/src/app/portfolio/images/new/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioImagesNewPage() { + return ( +
PortfolioImagesNewPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/images/page.tsx b/src/app/portfolio/images/page.tsx new file mode 100644 index 0000000..730f7f0 --- /dev/null +++ b/src/app/portfolio/images/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioImagesPage() { + return ( +
PortfolioImagesPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/tags/[id]/page.tsx b/src/app/portfolio/tags/[id]/page.tsx new file mode 100644 index 0000000..da136b3 --- /dev/null +++ b/src/app/portfolio/tags/[id]/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioTagsEditPage() { + return ( +
PortfolioTagsEditPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/tags/new/page.tsx b/src/app/portfolio/tags/new/page.tsx new file mode 100644 index 0000000..8fc36fa --- /dev/null +++ b/src/app/portfolio/tags/new/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioTagsNewPage() { + return ( +
PortfolioTagsNewPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/tags/page.tsx b/src/app/portfolio/tags/page.tsx new file mode 100644 index 0000000..1f59bfa --- /dev/null +++ b/src/app/portfolio/tags/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioTagsPage() { + return ( +
PortfolioTagsPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/types/[id]/page.tsx b/src/app/portfolio/types/[id]/page.tsx new file mode 100644 index 0000000..fa1b609 --- /dev/null +++ b/src/app/portfolio/types/[id]/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioTypesEditPage() { + return ( +
PortfolioTypesEditPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/types/new/page.tsx b/src/app/portfolio/types/new/page.tsx new file mode 100644 index 0000000..d62a762 --- /dev/null +++ b/src/app/portfolio/types/new/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioTypesNewPage() { + return ( +
PortfolioTypesNewPage
+ ); +} \ No newline at end of file diff --git a/src/app/portfolio/types/page.tsx b/src/app/portfolio/types/page.tsx new file mode 100644 index 0000000..6214c03 --- /dev/null +++ b/src/app/portfolio/types/page.tsx @@ -0,0 +1,5 @@ +export default function PortfolioTypesPage() { + return ( +
PortfolioTypesPage
+ ); +} \ No newline at end of file diff --git a/src/components/global/TopNav.tsx b/src/components/global/TopNav.tsx index debbe3a..ae922a8 100644 --- a/src/components/global/TopNav.tsx +++ b/src/components/global/TopNav.tsx @@ -16,32 +16,66 @@ export default function TopNav() { Portfolio -