Skip to content

Commit

Permalink
Merge pull request #290 from akhila-ariyachandra/development
Browse files Browse the repository at this point in the history
Fix incrementing views too much
  • Loading branch information
akhila-ariyachandra authored Mar 9, 2024
2 parents b156f78 + c3b5f16 commit c07c520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/_components/views/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const incrementViews = async (slug: string) => {

await db
.update(posts)
.set({ views: result.views + 1 })
.set({ views: result.views })
.where(eq(posts.slug, slug));
}

Expand Down

0 comments on commit c07c520

Please sign in to comment.