Skip to content
Snippets Groups Projects
Commit 5ec9dfc5 authored by Tom Wilkie's avatar Tom Wilkie
Browse files

Fix logic.


Signed-off-by: default avatarTom Wilkie <tom.wilkie@gmail.com>
parent b247a545
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ func main() {
func label() {
var path string
if labelName != nil {
if len(*labelName) > 0 {
path = fmt.Sprintf("/api/prom/label/%s/values", url.PathEscape(*labelName))
} else {
path = "/api/prom/label"
......
......@@ -108,7 +108,7 @@ func (q *Querier) QueryHandler(w http.ResponseWriter, r *http.Request) {
func (q *Querier) LabelHandler(w http.ResponseWriter, r *http.Request) {
name, ok := mux.Vars(r)["name"]
req := &logproto.LabelRequest{
Values: !ok,
Values: ok,
Name: name,
}
resp, err := q.Label(r.Context(), req)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment