Fix incorrect controller method. Remove wildcard cors from /api/chat
This commit is contained in:
parent
2ff9186ee2
commit
8f32c13ca6
@ -12,12 +12,12 @@ import (
|
|||||||
|
|
||||||
// ExternalGetChatMessages gets all of the chat messages.
|
// ExternalGetChatMessages gets all of the chat messages.
|
||||||
func ExternalGetChatMessages(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) {
|
func ExternalGetChatMessages(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) {
|
||||||
GetChatEmbed(w, r)
|
middleware.EnableCors(&w)
|
||||||
|
GetChatMessages(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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)
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
|
||||||
switch r.Method {
|
switch r.Method {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user