Skip to content

Commit

Permalink
print keys and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad2002 committed Dec 3, 2024
1 parent 867c291 commit 4a17359
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func getClaimsFromAuthHeader(c *gin.Context) (*model.TokenClaims, error) {
}

func checkIfRoot(c *gin.Context) error {
if checkServiceKey(c) == nil {
keyError := checkServiceKey(c)
if keyError == nil {
return nil
}

Expand All @@ -120,6 +121,7 @@ func checkIfRoot(c *gin.Context) error {
if tokenError == nil {
return nil
} else {
fmt.Printf("both auth checks for root failed: \n%s\n%s\n", keyError, tokenError)
return tokenError
}
}
Expand Down

0 comments on commit 4a17359

Please sign in to comment.