its a pool

its a poop
This commit is contained in:
Bel LaPointe
2020-07-22 19:03:15 -06:00
parent 43746485d4
commit 3b174e3d60
2 changed files with 28 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"local/whodunit/config"
"local/whodunit/storage"
"log"
"net/http"
)
@@ -37,9 +38,10 @@ func who(g storage.Graph, w http.ResponseWriter, r *http.Request) error {
return err
}
if len(ones) != 1 {
ones = nil
ones = append(ones, storage.One{})
}
results[id] = ones[0]
}
log.Println("results:", results)
return json.NewEncoder(w).Encode(results)
}