Change POST to GET for view counter

This commit is contained in:
Web-serfer 2026-04-27 21:00:34 +05:00
parent 4f6d82bc7b
commit 8b7301d0da
2 changed files with 2 additions and 13 deletions

View file

@ -315,7 +315,7 @@ const {
if (viewsEl?.dataset?.postId) {
const postId = viewsEl.dataset.postId;
fetch(`/api/increment-views?postId=${postId}`, { method: 'POST' })
fetch(`/api/increment-views?postId=${postId}`)
.then(res => res.json())
.then(data => {
if (data.views !== undefined) {