diff options
| author | Jeff Carr <[email protected]> | 2025-09-06 19:50:40 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-06 20:07:59 -0500 |
| commit | eae2c3be2bcd6c30fc665ab1a99edb26110115d2 (patch) | |
| tree | 3caf78a5effe790dd8c0c65efa4a9ffc2bd2d620 /handlePatches.go | |
| parent | 4e5a34b772db9df404b0b927f3ee9b9b54f65cdd (diff) | |
keep working towards common http PBv0.0.23
Diffstat (limited to 'handlePatches.go')
| -rw-r--r-- | handlePatches.go | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/handlePatches.go b/handlePatches.go index f270d74..730d04f 100644 --- a/handlePatches.go +++ b/handlePatches.go @@ -9,22 +9,11 @@ import ( "go.wit.com/log" ) -func handlePatches(w http.ResponseWriter, r *http.Request, data []byte) error { - pb, err := marshalPatchesPB(r, data) - if err != nil { - return sendPatchesError(w, pb, err) - } - +func handlePatches(w http.ResponseWriter, pb *forgepb.Patches) error { route := pb.HttpRequest.Route - if route == "" { - route = cleanURL(r.URL.Path) - } - if route == "" { - route = "route was blank" - } + log.Info("GOT PATCHES ROUTE", route, "with # patches =", pb.Len()) if strings.HasPrefix(route, "/patches/old") { - processPatchesOldPB(r, pb) } else if strings.HasPrefix(route, "/patches/new") { log.Info("add new patches") } else { @@ -45,12 +34,6 @@ func sendPatchesError(w http.ResponseWriter, r *forgepb.Patches, err error) erro return nil } -func processPatchesOldPB(r *http.Request, pb *forgepb.Patches) error { - log.Info("check out these patches") - pb.PrintTable() - return nil -} - func marshalPatchesPB(r *http.Request, msg []byte) (*forgepb.Patches, error) { pb := forgepb.NewPatches() |
