diff --git a/main.go b/main.go index 9c1c7d2..2c8918f 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,6 @@ import ( configTypes "grain/config/types" relay "grain/server" "grain/server/db" - "grain/server/nip" "grain/server/utils" "log" "net/http" @@ -36,7 +35,7 @@ func main() { config.SetupRateLimiter(cfg) config.SetupSizeLimiter(cfg) - err = nip.LoadRelayMetadataJSON() + err = utils.LoadRelayMetadataJSON() if err != nil { log.Fatal("Failed to load relay metadata: ", err) } @@ -85,7 +84,7 @@ func ListenAndServe(w http.ResponseWriter, r *http.Request) { if r.Header.Get("Upgrade") == "websocket" { wsServer.ServeHTTP(w, r) } else if r.Header.Get("Accept") == "application/nostr+json" { - nip.RelayInfoHandler(w, r) + utils.RelayInfoHandler(w, r) } else { app.RootHandler(w, r) } diff --git a/server/nip/11RelayMetadata.go b/server/utils/loadRelayMetadata.go similarity index 98% rename from server/nip/11RelayMetadata.go rename to server/utils/loadRelayMetadata.go index 925bec8..e167608 100644 --- a/server/nip/11RelayMetadata.go +++ b/server/utils/loadRelayMetadata.go @@ -1,4 +1,4 @@ -package nip +package utils import ( "encoding/json"