Skip to content

Commit

Permalink
upgraded to dela v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jbsv committed Apr 15, 2024
1 parent 89ab236 commit 8773370
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/server_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of Sonar analysis

Expand Down
12 changes: 8 additions & 4 deletions server/blockchain/web/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ func (s *secretHandler) advertiseSmc(w http.ResponseWriter, r *http.Request) {
}

dela.Logger.Info().Msg("SMC advertised to the blockchain")

return
}

// addSecret adds a new secret in the blockchain
Expand Down Expand Up @@ -175,14 +173,20 @@ func (s *secretHandler) addSecret(w http.ResponseWriter, r *http.Request) {
// listSecrets lists all secrets in the blockchain
func (s *secretHandler) listSecrets(w http.ResponseWriter, r *http.Request) {
// list all secrets from the blockchain
r.ParseForm()
err := r.ParseForm()
if err != nil {
dela.Logger.Error().Err(err).Msg("failed to parse form")
http.Error(w, fmt.Sprintf("failed to parse form: %v", err),
http.StatusInternalServerError)
return
}

pubkey := r.Form.Get("pubkey")
dela.Logger.Info().Msgf("received request from %v to list the secrets", pubkey)

// get the calypso contract
var c calypso.Contract
err := s.ctx.Injector.Resolve(&c)
err = s.ctx.Injector.Resolve(&c)
if err != nil {
dela.Logger.Error().Err(err).Msg("failed to resolve calypso contract")
http.Error(w, fmt.Sprintf("failed to resolve calypso contract: %v", err),
Expand Down
35 changes: 17 additions & 18 deletions server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ go 1.21

require (
github.com/gorilla/mux v1.8.1
github.com/rs/zerolog v1.31.0
github.com/rs/zerolog v1.32.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
go.dedis.ch/dela v0.0.0-20240330091609-33fd2a361d2d
github.com/stretchr/testify v1.9.0
go.dedis.ch/dela v0.1.0
go.dedis.ch/kyber/v3 v3.1.1-0.20231024084410-31ea167adbbb
go.dedis.ch/purb-db v0.0.1
go.mongodb.org/mongo-driver v1.13.2
go.mongodb.org/mongo-driver v1.14.0
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
)

Expand All @@ -19,20 +19,19 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dedis/debugtools v0.0.0-20221206213939-0bc3bacd3042 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
Expand All @@ -47,30 +46,30 @@ require (
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/urfave/cli/v2 v2.27.1 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.dedis.ch/debugtools v0.1.1 // indirect
go.dedis.ch/fixbuf v1.0.3 // indirect
go.dedis.ch/libpurb v0.0.0-20231108133532-c70e1b84b632 // indirect
go.dedis.ch/protobuf v1.0.11 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 8773370

Please sign in to comment.