Skip to content

Commit

Permalink
add: log for gist root
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko committed May 16, 2024
1 parent 044f8dc commit 2701f56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/service/api/handlers/get_gist_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/rarimo/passport-identity-provider/resources"
"gitlab.com/distributed_lab/ape"
"gitlab.com/distributed_lab/ape/problems"
"gitlab.com/distributed_lab/logan/v3"
)

func GetGistData(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -63,6 +64,13 @@ func GetGistData(w http.ResponseWriter, r *http.Request) {
return
}

if gistProof.Root.Cmp(gistRoot) != 0 {
Log(r).WithFields(logan.F{
"gist_root": gistRoot.String(),
"gist_proof_root": gistProof.Root.String(),
}).Warn("gist root does not match")
}

response := newGistDataResponse(req.UserDID, gistProof, gistRoot)

ape.Render(w, response)
Expand Down

0 comments on commit 2701f56

Please sign in to comment.