getwtxt/getwtxt

View on GitHub
svc/handlers.go

Summary

Maintainability
A
1 hr
Test Coverage

Function apiEndpointHandler has 56 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func apiEndpointHandler(w http.ResponseWriter, r *http.Request) {
    errLog("Error when parsing query values: ", r.ParseForm())

    if r.FormValue("q") != "" || r.FormValue("url") != "" {
        err := apiEndpointQuery(w, r)
Severity: Minor
Found in svc/handlers.go - About 1 hr to fix

Function handleUserDelete has 5 return statements (exceeds 4 allowed).
Open

func handleUserDelete(w http.ResponseWriter, r *http.Request) {
    pass := r.Header.Get("X-Auth")
    if pass == "" {
        errHTTP(w, r, errors.New("unauthorized"), http.StatusUnauthorized)
        return
Severity: Major
Found in svc/handlers.go - About 35 mins to fix

There are no issues that match your filters.

Category
Status