|
|
@ -348,10 +348,7 @@ func (api *API) query(r *http.Request) apiFuncResult { |
|
|
|
return apiFuncResult{nil, &apiError{errorBadData, err}, nil, nil} |
|
|
|
return apiFuncResult{nil, &apiError{errorBadData, err}, nil, nil} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ctx, err = httputil.ContextFromRequest(ctx, r) |
|
|
|
ctx = httputil.ContextFromRequest(ctx, r) |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return apiFuncResult{nil, returnAPIError(err), nil, nil} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res := qry.Exec(ctx) |
|
|
|
res := qry.Exec(ctx) |
|
|
|
if res.Err != nil { |
|
|
|
if res.Err != nil { |
|
|
@ -423,10 +420,7 @@ func (api *API) queryRange(r *http.Request) apiFuncResult { |
|
|
|
return apiFuncResult{nil, &apiError{errorBadData, err}, nil, nil} |
|
|
|
return apiFuncResult{nil, &apiError{errorBadData, err}, nil, nil} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ctx, err = httputil.ContextFromRequest(ctx, r) |
|
|
|
ctx = httputil.ContextFromRequest(ctx, r) |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return apiFuncResult{nil, returnAPIError(err), nil, nil} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res := qry.Exec(ctx) |
|
|
|
res := qry.Exec(ctx) |
|
|
|
if res.Err != nil { |
|
|
|
if res.Err != nil { |
|
|
|