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") {} }