Moge-Row commited on
Commit
62e7f6b
·
1 Parent(s): 58b5566

fix fprintf escaping

Browse files
Files changed (1) hide show
  1. internal/handler/keys.go +1 -1
internal/handler/keys.go CHANGED
@@ -96,7 +96,7 @@ func HandleGenKey(w http.ResponseWriter, r *http.Request) {
96
  }
97
  key := GenerateKey(name)
98
  w.Header().Set("Content-Type", "application/json")
99
- fmt.Fprintf(w, "{"key":"%s","name":"%s"}", key, name)
100
  }
101
 
102
  func HandleStats(w http.ResponseWriter, r *http.Request) {
 
96
  }
97
  key := GenerateKey(name)
98
  w.Header().Set("Content-Type", "application/json")
99
+ fmt.Fprintf(w, "{\"key\":\"%s\",\"name\":\"%s\"}", key, name)
100
  }
101
 
102
  func HandleStats(w http.ResponseWriter, r *http.Request) {