From dfcc271343ec40b2dfc957d9725fae76e01eab17 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Wed, 4 Sep 2024 23:02:19 -0400 Subject: [PATCH] bug fix --- components/LinkDetails.tsx | 2 +- hooks/store/links.tsx | 2 +- pages/api/v1/archives/[linkId].ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/LinkDetails.tsx b/components/LinkDetails.tsx index 3f73a35..e1568c6 100644 --- a/components/LinkDetails.tsx +++ b/components/LinkDetails.tsx @@ -221,7 +221,7 @@ export default function LinkDetails({ width={1280} height={720} alt="" - className="object-cover scale-105" + className="object-cover scale-105 object-center h-full" style={{ filter: "blur(1px)", }} diff --git a/hooks/store/links.tsx b/hooks/store/links.tsx index 3cc9f8e..037f974 100644 --- a/hooks/store/links.tsx +++ b/hooks/store/links.tsx @@ -412,7 +412,7 @@ const useUpdatePreview = () => { `/api/v1/archives/${linkId}?format=` + ArchivedFormat.jpeg, { body: formBody, - method: "POST", + method: "PUT", } ); diff --git a/pages/api/v1/archives/[linkId].ts b/pages/api/v1/archives/[linkId].ts index f3e342a..d8859b7 100644 --- a/pages/api/v1/archives/[linkId].ts +++ b/pages/api/v1/archives/[linkId].ts @@ -206,7 +206,7 @@ export default async function Index(req: NextApiRequest, res: NextApiResponse) { }); } // To update the link preview - else if (req.method === "PUT" && format === ArchivedFormat.jpeg) { + else if (req.method === "PUT") { if (process.env.NEXT_PUBLIC_DEMO === "true") return res.status(400).json({ response: