Skip to content

Commit

Permalink
Merge pull request #4 from NetSepio/inciner8r-patch-1
Browse files Browse the repository at this point in the history
Inciner8r patch 1
  • Loading branch information
inciner8r authored Apr 22, 2024
2 parents 385890e + da06151 commit 9d7cd0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/v1/authenticate/paseto/paseto.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ func PASETO(c *gin.Context) {
defer resp.Body.Close()
var responseBody webappResponse
err = json.NewDecoder(resp.Body).Decode(&responseBody)
fmt.Println("Wallet Address: ", responseBody.WalletAddress)
fmt.Println("Wallet Address: ", responseBody.Payload.WalletAddress)
if err != nil {
fmt.Printf("Failed to decode response body: %s\n", err)
return
} else {
c.Set("walletAddress", responseBody.WalletAddress)
c.Set("walletAddress", responseBody.Payload.WalletAddress)
c.Next()
}
// parser := gopaseto.NewParser()
Expand Down
7 changes: 6 additions & 1 deletion api/v1/authenticate/paseto/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ type GenericAuthHeaders struct {
}

type webappResponse struct {
WalletAddress string `json:"walletAddress"`
Status int `json:"status"`
Message string `json:"message"`
Payload struct {
UserID string `json:"userId"`
WalletAddress string `json:"walletAddress"`
} `json:"payload"`
}

0 comments on commit 9d7cd0a

Please sign in to comment.