Browse Source

Add missing content-type

pull/387/head
Gabe Kangas 5 years ago
parent
commit
e860f9ab2f
  1. 1
      controllers/chat.go
  2. 1
      controllers/config.go

1
controllers/chat.go

@ -13,6 +13,7 @@ import (
// GetChatMessages gets all of the chat messages. // GetChatMessages gets all of the chat messages.
func GetChatMessages(w http.ResponseWriter, r *http.Request) { func GetChatMessages(w http.ResponseWriter, r *http.Request) {
middleware.EnableCors(&w) middleware.EnableCors(&w)
w.Header().Set("Content-Type", "application/json")
switch r.Method { switch r.Method {
case http.MethodGet: case http.MethodGet:

1
controllers/config.go

@ -11,6 +11,7 @@ import (
// GetWebConfig gets the status of the server. // GetWebConfig gets the status of the server.
func GetWebConfig(w http.ResponseWriter, r *http.Request) { func GetWebConfig(w http.ResponseWriter, r *http.Request) {
middleware.EnableCors(&w) middleware.EnableCors(&w)
w.Header().Set("Content-Type", "application/json")
configuration := config.Config.InstanceDetails configuration := config.Config.InstanceDetails
configuration.Version = config.Config.VersionInfo configuration.Version = config.Config.VersionInfo

Loading…
Cancel
Save