From 7bdef522c1666c72a7395904145e752fbc7b73cf Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Mon, 6 Nov 2023 10:01:39 -0500 Subject: [PATCH] bug fixed --- components/LinkCard.tsx | 2 +- pages/api/v1/links/[id]/archive/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/LinkCard.tsx b/components/LinkCard.tsx index d7c28eb..55b5d1b 100644 --- a/components/LinkCard.tsx +++ b/components/LinkCard.tsx @@ -110,7 +110,7 @@ export default function LinkCard({ link, count, className }: Props) { if (response.ok) { toast.success(`Link is being archived...`); getLink(link.id as number); - } else toast.error(data); + } else toast.error(data.response); }; const deleteLink = async () => { diff --git a/pages/api/v1/links/[id]/archive/index.ts b/pages/api/v1/links/[id]/archive/index.ts index 7fc141f..65da756 100644 --- a/pages/api/v1/links/[id]/archive/index.ts +++ b/pages/api/v1/links/[id]/archive/index.ts @@ -47,7 +47,7 @@ export default async function links(req: NextApiRequest, res: NextApiResponse) { }); } - // Later? + // TODO - Later? // else if (req.method === "DELETE") {} }