update websocket handler, but I'm like semi-guessing that this is right

This commit is contained in:
idk
2020-09-13 00:03:53 -04:00
parent b8152a9548
commit 69f16f6a70

View File

@ -1,12 +1,12 @@
package samcore
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"encoding/json"
"github.com/gorilla/websocket"
"github.com/justinas/alice"
@ -92,10 +92,10 @@ func wsMiddleware(next http.Handler) http.Handler {
return
}
var dat map[string]interface{}
if err := json.Unmarshal(p, &dat); err != nil {
if err := json.Unmarshal(p, &dat); err != nil {
log.Println(err)
return
}
return
}
rr := core.Receiver.Announce.ProcessAnnounce(
dat[`X-I2p-Dest-Base64`].(string),