mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
feat: add incrementing visitor counter
This commit is contained in:
parent
afcd4e9a8a
commit
a92db04713
3 changed files with 41 additions and 5 deletions
|
|
@ -14,5 +14,8 @@ func HandleGetVisitorCounter(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func HandlePatchVisitorCounter(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("hello world"))
|
||||
data := service.IncrementVisitorCounter()
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(data)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue