1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

Code cleanup

This commit is contained in:
Ralph Slooten 2023-09-22 07:02:15 +12:00
parent b193851269
commit 8e0c174bf3
2 changed files with 3 additions and 3 deletions
server
apiv1
websockets

@ -406,7 +406,7 @@ func DeleteMessages(w http.ResponseWriter, r *http.Request) {
}
}
w.Header().Add("Content-Type", "text/plain")
w.Header().Add("Content-Type", "application/json")
_, _ = w.Write([]byte("ok"))
}
@ -843,7 +843,7 @@ func getStartLimit(req *http.Request) (start int, limit int) {
}
// GetOptions returns a blank response
func GetOptions(w http.ResponseWriter, r *http.Request) {
func GetOptions(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "text/plain")
_, _ = w.Write([]byte(""))

@ -79,7 +79,7 @@ func Broadcast(t string, msg interface{}) {
b, err := json.Marshal(w)
if err != nil {
logger.Log().Errorf("[http] broadcast received invalid data: %s", err)
logger.Log().Errorf("[websocket] broadcast received invalid data: %s", err)
}
go func() { MessageHub.Broadcast <- b }()