Skip to content

Commit

Permalink
`Remove unused import and replace httpo error response with custom er…
Browse files Browse the repository at this point in the history
…ror response`

This commit message accurately describes the changes made in the code diff, which includes removing an unused import and replacing an error response with a custom one.
  • Loading branch information
p-shubh committed Dec 28, 2024
1 parent 7d61c30 commit de34283
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
7 changes: 5 additions & 2 deletions api/v1/authenticate/authenticate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/NetSepio/erebrus/api/v1/authenticate/challengeid"
"github.com/NetSepio/erebrus/util/pkg/auth"
"github.com/NetSepio/erebrus/util/pkg/claims"
"github.com/TheLazarusNetwork/go-helpers/httpo"

"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -129,7 +128,11 @@ func authenticate(c *gin.Context) {

default:
info := "chain name must be between solana, peaq, aptos, sui, eclipse, ethereum"
httpo.NewErrorResponse(http.StatusBadRequest, "Invalid chain name, INFO : "+info).SendD(c)
log.WithFields(log.Fields{
"err": err,
}).Errorf("Invalid chain name, INFO : %s\n", info)
errResponse := ErrAuthenticate("failed to CheckSignature, error :" + "Invalid chain name, INFO : " + info)
c.JSON(http.StatusInternalServerError, errResponse)
return
}
if isCorrect {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ toolchain go1.22.2

require (
aidanwoods.dev/go-paseto v1.2.0
github.com/TheLazarusNetwork/go-helpers/httpo v0.0.0-20231109144013-1ac3070f2b48
github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e
github.com/docker/docker v26.0.1+incompatible
github.com/ethereum/go-ethereum v1.10.26
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25Yn
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw=
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec h1:1Qb69mGp/UtRPn422BH4/Y4Q3SLUrD9KHuDkm8iodFc=
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec/go.mod h1:CD8UlnlLDiqb36L110uqiP2iSflVjx9g/3U9hCI4q2U=
github.com/TheLazarusNetwork/go-helpers/httpo v0.0.0-20231109144013-1ac3070f2b48 h1:ih3hzHExA9BKYU2Ta8yxoTj8WDJzd+c9qqCr5OyU99E=
github.com/TheLazarusNetwork/go-helpers/httpo v0.0.0-20231109144013-1ac3070f2b48/go.mod h1:mdZW8fVhYr37eUysX2isro+rtUrhxODPh/zTN94VhcQ=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
Expand Down

0 comments on commit de34283

Please sign in to comment.