mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-10-29 17:16:31 +00:00
removed nip package
This commit is contained in:
parent
25ff327a7f
commit
9a4a55e914
5
main.go
5
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)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nip
|
||||
package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
Loading…
Reference in New Issue
Block a user