Skip to content

Commit

Permalink
Console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tadaspetra committed Jun 1, 2024
1 parent 835351f commit aa2a878
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/articles/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
---

Expand Down

0 comments on commit aa2a878

Please sign in to comment.