refactor server to support variable options

This commit is contained in:
Hayden 2022-10-03 15:43:36 -08:00
parent 245591cb23
commit 1143246816
6 changed files with 89 additions and 21 deletions

View file

@ -21,7 +21,7 @@ func Respond(w http.ResponseWriter, statusCode int, data interface{}) {
}
// Set the content type and headers once we know marshaling has succeeded.
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Content-Type", ContentJSON)
// Write the status code to the response.
w.WriteHeader(statusCode)