Spaces:
Paused
Paused
fix genkey response
Browse files- internal/handler/keys.go +2 -1
internal/handler/keys.go
CHANGED
|
@@ -112,7 +112,8 @@ func HandleGenKey(w http.ResponseWriter, r *http.Request) {
|
|
| 112 |
}
|
| 113 |
key := GenerateKey(name)
|
| 114 |
w.Header().Set("Content-Type", "application/json")
|
| 115 |
-
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
func HandleStats(w http.ResponseWriter, r *http.Request) {
|
|
|
|
| 112 |
}
|
| 113 |
key := GenerateKey(name)
|
| 114 |
w.Header().Set("Content-Type", "application/json")
|
| 115 |
+
resp := map[string]string{"key": key, "name": name}
|
| 116 |
+
json.NewEncoder(w).Encode(resp)
|
| 117 |
}
|
| 118 |
|
| 119 |
func HandleStats(w http.ResponseWriter, r *http.Request) {
|