Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback pseudo complete tasks disabling. #107

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions cmd/santa-sleigh/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions cmd/santa-sleigh/santa_sleigh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions cmd/santa-sleigh/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down Expand Up @@ -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=
Expand Down
Loading