diff --git a/.env b/.env index d6e12c1..1af608f 100644 --- a/.env +++ b/.env @@ -8,8 +8,8 @@ REDIS_ADDR="${REDIS_HOST}:${REDIS_PORT}" # PostgreSQL POSTGRES_LOGIN=postgres -POSTGRES_PASSWORD=GjitkYf%5Beq -POSTGRES_PORT=5432 +POSTGRES_PASSWORD=ReDW6RkgFMGdcVk767zLAtQfG9ddjGwH +POSTGRES_PORT=6432 POSTGRES_DATABASE=sipro -POSTGRES_HOST=62.217.177.161 +POSTGRES_HOST=212.8.226.158 POSTGRES_URL="postgresql://${POSTGRES_LOGIN}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}" diff --git a/.gitmodules b/.gitmodules index a2fdb08..d8104b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ [submodule "pkg/api/yandex/raw"] path = pkg/api/yandex/raw url = https://github.com/yandex-market/yandex-market-partner-api.git +[submodule "api/proto/v1"] + path = api/proto/v1 + url = https://git.denco.store/fakz9/Sipro-Marketplaces-Protos diff --git a/api/proto/v1 b/api/proto/v1 new file mode 160000 index 0000000..8aea1ed --- /dev/null +++ b/api/proto/v1 @@ -0,0 +1 @@ +Subproject commit 8aea1ed4114058f4ab8904e552d1e3787a0fd04a diff --git a/cmd/test/main.go b/cmd/test/main.go index 919efbf..2340057 100644 --- a/cmd/test/main.go +++ b/cmd/test/main.go @@ -1,6 +1,9 @@ package main -import "sipro-mps/pkg/utils" +import ( + "fmt" + "sipro-mps/internal/ym/products" +) // package main // @@ -28,13 +31,8 @@ import "sipro-mps/pkg/utils" // } // } // } + func main() { - arr := []string{"1", "2", "3", "4", "5"} - - hash, err := utils.HashArray(arr) - - if err != nil { - panic(err) - } - println("Hash of array:", hash) + rs := products.GetCategoriesError("{\"status\":\"ERROR\",\"errors\":[{\"code\":\"BAD_REQUEST\",\"message\":\"Following categories are not leaf categories: 91735\"}]}") + fmt.Println(rs) }