From 8eb62629d7c35c90a0f312892049750358f2ee1e Mon Sep 17 00:00:00 2001 From: ice-myles <96409608+ice-myles@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:32:07 +0300 Subject: [PATCH] Rollback pseudo complete tasks disabling. --- cmd/santa-sleigh/contract.go | 9 --------- cmd/santa-sleigh/santa_sleigh.go | 1 + cmd/santa-sleigh/tasks.go | 3 --- go.mod | 6 +++--- go.sum | 12 ++++++------ 5 files changed, 10 insertions(+), 21 deletions(-) diff --git a/cmd/santa-sleigh/contract.go b/cmd/santa-sleigh/contract.go index 15b342a..88e8e78 100644 --- a/cmd/santa-sleigh/contract.go +++ b/cmd/santa-sleigh/contract.go @@ -3,8 +3,6 @@ package main import ( - "github.com/pkg/errors" - "github.com/ice-blockchain/santa/badges" friendsinvited "github.com/ice-blockchain/santa/friends-invited" levelsandroles "github.com/ice-blockchain/santa/levels-and-roles" @@ -37,13 +35,6 @@ const ( taskNotCompletedCode = "TASK_NOT_COMPLETED" ) -// . -var ( - //nolint:gochecknoglobals // Because its loaded once, at runtime. - cfg config - errForbidden = errors.New("disabled") -) - type ( // | service implements server.State and is responsible for managing the state and lifecycle of the package. service struct { diff --git a/cmd/santa-sleigh/santa_sleigh.go b/cmd/santa-sleigh/santa_sleigh.go index aa924ea..7c5e74f 100644 --- a/cmd/santa-sleigh/santa_sleigh.go +++ b/cmd/santa-sleigh/santa_sleigh.go @@ -29,6 +29,7 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() + var cfg config appcfg.MustLoadFromKey(applicationYamlKey, &cfg) api.SwaggerInfo.Host = cfg.Host api.SwaggerInfo.Version = cfg.Version diff --git a/cmd/santa-sleigh/tasks.go b/cmd/santa-sleigh/tasks.go index 8697554..c8088de 100644 --- a/cmd/santa-sleigh/tasks.go +++ b/cmd/santa-sleigh/tasks.go @@ -41,9 +41,6 @@ func (s *service) PseudoCompleteTask( //nolint:gocritic // False negative. ctx context.Context, req *server.Request[CompleteTaskRequestBody, any], ) (*server.Response[any], *server.Response[server.ErrorResponse]) { - if cfg.Tenant == "doctorx" { - return nil, server.Forbidden(errForbidden) - } task := &tasks.Task{ Data: req.Data.Data, Type: req.Data.TaskType, diff --git a/go.mod b/go.mod index ac5458e..cd42b93 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23 require ( github.com/goccy/go-json v0.10.3 github.com/hashicorp/go-multierror v1.1.1 - github.com/ice-blockchain/eskimo v1.434.0 + github.com/ice-blockchain/eskimo v1.435.0 github.com/ice-blockchain/wintr v1.154.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.10.0 @@ -14,7 +14,7 @@ require ( ) require ( - cel.dev/expr v0.18.0 // indirect + cel.dev/expr v0.19.0 // indirect cloud.google.com/go v0.116.0 // indirect cloud.google.com/go/auth v0.11.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect @@ -90,7 +90,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb // indirect github.com/imroc/req/v3 v3.48.0 // indirect - github.com/ip2location/ip2location-go/v9 v9.7.0 // indirect + github.com/ip2location/ip2location-go/v9 v9.7.1 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgx/v5 v5.7.1 // indirect diff --git a/go.sum b/go.sum index 1013d55..0134975 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= -cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.19.0 h1:lXuo+nDhpyJSpWxpPVi5cPUwzKb+dsdOiw6IreM5yt0= +cel.dev/expr v0.19.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= @@ -219,16 +219,16 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/ice-blockchain/eskimo v1.434.0 h1:tS1Zw6hH4YqF+s7OIuFR5dw8oYcFnNfzPfjbgRwaBGU= -github.com/ice-blockchain/eskimo v1.434.0/go.mod h1:44EGWQqA2PiX8zJ0H3NMhODEyt7TLA1jFDhzJP73Qfc= +github.com/ice-blockchain/eskimo v1.435.0 h1:jyDTXW7vhDmjunU5KI9LaZzkk3Qid7g9n+R7x6KMfp0= +github.com/ice-blockchain/eskimo v1.435.0/go.mod h1:4V9HfeL8L9HpeoB4bZQxinPw0lNkE6jTSttnxxxZOv0= github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb h1:8TnFP3mc7O+tc44kv2e0/TpZKnEVUaKH+UstwfBwRkk= github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb/go.mod h1:ZsQU7i3mxhgBBu43Oev7WPFbIjP4TniN/b1UPNGbrq8= github.com/ice-blockchain/wintr v1.154.0 h1:yZSQtAEwGHTSmJ5pXjX0tpui1TNnG615QfpBkhY99a4= github.com/ice-blockchain/wintr v1.154.0/go.mod h1:DoUn66XJGzPzfCZTsHyMjfgj2aVLGvjqDSuKj2pa3KE= github.com/imroc/req/v3 v3.48.0 h1:IYuMGetuwLzOOTzDCquDqs912WNwpsPK0TBXWPIvoqg= github.com/imroc/req/v3 v3.48.0/go.mod h1:weam9gmyb00QnOtu6HXSnk44dNFkIUQb5QdMx13FeUU= -github.com/ip2location/ip2location-go/v9 v9.7.0 h1:ipwl67HOWcrw+6GOChkEXcreRQR37NabqBd2ayYa4Q0= -github.com/ip2location/ip2location-go/v9 v9.7.0/go.mod h1:MPLnsKxwQlvd2lBNcQCsLoyzJLDBFizuO67wXXdzoyI= +github.com/ip2location/ip2location-go/v9 v9.7.1 h1:eXu/DqS13QE0h1Yrc9oji+6/anLD9KDf6Ulf5GdIQs8= +github.com/ip2location/ip2location-go/v9 v9.7.1/go.mod h1:MPLnsKxwQlvd2lBNcQCsLoyzJLDBFizuO67wXXdzoyI= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=