diff --git a/storage/embeds.go b/storage/embeds.go index 828fa1c..338c91c 100644 --- a/storage/embeds.go +++ b/storage/embeds.go @@ -3,11 +3,8 @@ package storage import ( "embed" "encoding/json" - "io" - "net/http" + "os" "strings" - - "github.com/ectrc/snow/aid" ) var ( @@ -29,15 +26,15 @@ func Asset(file string) (*[]byte) { } func HttpAsset[T interface{}](file string) (*T) { - client := http.Client{} + // client := http.Client{} - resp, err := client.Get(aid.Config.API.Host + "/snow/httpassets/" + file) // resp, err := client.Get("https://raw.githubusercontent.com/ectrc/ectrc/main/" + file) - if err != nil { - return nil - } + // if err != nil { + // return nil + // } - data, err := io.ReadAll(resp.Body) + data, err := os.ReadFile("./data/" + file) + // data, err := io.ReadAll(resp.Body) if err != nil { return nil }