Skip to content

Commit

Permalink
bake in old hit count
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldesigndj committed Sep 20, 2023
1 parent 491797e commit f0071cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/_middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function handler(req, ctx) {
value: new Deno.KvU64(1n),
}).commit()
const v = await kv.get(key)
ctx.state.hits = parseInt(v.value.value)
ctx.state.hits = parseInt(v.value.value) + 5844
}
const resp = await ctx.next()
const now = Date.now()
Expand Down

0 comments on commit f0071cf

Please sign in to comment.