Skip to content

Commit

Permalink
fix: question view counts (#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariojsnunes authored Jan 31, 2025
1 parent 1d6908e commit 6787820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/_.questions.$slug._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
const dbQuestion = result.data as unknown as DBQuestion

if (dbQuestion.id) {
client
await client
.from('questions')
.update({ total_views: (dbQuestion.total_views || 0) + 1 })
.eq('id', dbQuestion.id)
Expand Down

0 comments on commit 6787820

Please sign in to comment.