From aa2a8781acffd8a45d60ad1f52113e2e6230a3b0 Mon Sep 17 00:00:00 2001 From: Tadas Petra Date: Sat, 1 Jun 2024 12:03:41 -0500 Subject: [PATCH] Console logs --- src/pages/articles/[slug].astro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/articles/[slug].astro b/src/pages/articles/[slug].astro index 209d9f8..f98c51f 100644 --- a/src/pages/articles/[slug].astro +++ b/src/pages/articles/[slug].astro @@ -22,8 +22,10 @@ try { .set({ views: viewEntry[0].views + 1 }) .where(eq(Views.slug, entry.slug)); } catch (error) { + console.log(error); await db.insert(Views).values({ slug: entry.slug, views: 1 }); viewEntry = await db.select().from(Views).where(eq(Views.slug, entry.slug)); + console.log(viewEntry); } ---