mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
refactor: rename /visitor-counter to /visit-counter
This commit is contained in:
parent
521a634d2e
commit
b62f4cd017
4 changed files with 12 additions and 12 deletions
|
|
@ -6,15 +6,15 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
func HandleGetVisitorCounter(w http.ResponseWriter, r *http.Request) {
|
||||
data := service.GetVisitorCounter()
|
||||
func HandleGetVisitCounter(w http.ResponseWriter, r *http.Request) {
|
||||
data := service.GetVisitCounter()
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(data)
|
||||
}
|
||||
|
||||
func HandlePatchVisitorCounter(w http.ResponseWriter, r *http.Request) {
|
||||
data := service.IncrementVisitorCounter()
|
||||
func HandlePatchVisitCounter(w http.ResponseWriter, r *http.Request) {
|
||||
data := service.IncrementVisitCounter()
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(data)
|
||||
Loading…
Add table
Add a link
Reference in a new issue