mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
refactor: rename visitor counter to hit counter
This commit is contained in:
parent
38b93391a1
commit
32aea2cbd5
4 changed files with 12 additions and 12 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue