refactor: rename visitor counter to hit counter

This commit is contained in:
trafficlunar 2025-03-20 22:31:39 +00:00
parent 38b93391a1
commit 32aea2cbd5
4 changed files with 12 additions and 12 deletions

View file

@ -6,15 +6,15 @@ import (
"net/http"
)
func HandleGetVisitCounter(w http.ResponseWriter, r *http.Request) {
data := service.GetVisitCounter()
func HandleGetHitCounter(w http.ResponseWriter, r *http.Request) {
data := service.GetHitCounter()
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
}
func HandlePatchVisitCounter(w http.ResponseWriter, r *http.Request) {
data := service.IncrementVisitCounter()
func HandlePatchHitCounter(w http.ResponseWriter, r *http.Request) {
data := service.IncrementHitCounter()
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)