Use JSON for suggest responses

This commit is contained in:
Ian Gulliver
2024-11-26 13:29:56 -06:00
parent 0512fa41f6
commit a425ced673
3 changed files with 15 additions and 2 deletions

13
suggest.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import (
"net/http"
)
type SuggestResponse struct {
Message string `json:"message"`
}
func sendSuggestResponse(w http.ResponseWriter, msg string) {
sendJSON(w, SuggestResponse{Message: msg})
}