summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/http.go b/http.go
index 030983e..ffbc5e3 100644
--- a/http.go
+++ b/http.go
@@ -45,8 +45,18 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
}
if route == "/lookup" {
- // repos, err := lookupRepos(w, msg)
- lookupRepos(w, msg)
+ found, err := lookupRepos(msg)
+ if err != nil {
+ return
+ }
+ // marshal the protobuf to xfer over the socket
+ data, err := found.Marshal()
+ if err != nil {
+ log.Info("repos.Marshal() to wire failed", err)
+ return
+ }
+
+ w.Write(data)
return
}