Skip to content

Commit

Permalink
Add else block to prevent doubled return
Browse files Browse the repository at this point in the history
  • Loading branch information
haoming29 committed Mar 11, 2024
1 parent 48ec6e0 commit 73ce386
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web_ui/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ func promQueryEngineAuthHandler(av1 *route.Router) gin.HandlerFunc {
av1.ServeHTTP(c.Writer, c.Request)
} else {
c.JSON(status, gin.H{"error": "Correct authorization required to access Prometheus query engine APIs. " + err.Error()})
return
}
} else {
av1.ServeHTTP(c.Writer, c.Request)
}
av1.ServeHTTP(c.Writer, c.Request)
}
}

0 comments on commit 73ce386

Please sign in to comment.