Use get instead of connect

This commit is contained in:
Melon 2023-09-11 17:35:29 +01:00
parent 644b5e73fb
commit 29b1694840
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -23,7 +23,7 @@ func SetupApiServer(listen string, auth *AuthChecker, send Smtp, recv Imap) *htt
// === SMTP ===
r.POST("/smtp", auth.Middleware(MessageSender(send)))
r.Handle(http.MethodConnect, "/imap", func(rw http.ResponseWriter, req *http.Request, params httprouter.Params) {
r.GET("/imap", func(rw http.ResponseWriter, req *http.Request, params httprouter.Params) {
// upgrade to websocket conn and defer close
c, err := upgrader.Upgrade(rw, req, nil)
if err != nil {