Use JSON for suggest responses
This commit is contained in:
13
suggest.go
Normal file
13
suggest.go
Normal 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})
|
||||
}
|
||||
Reference in New Issue
Block a user