diff options
Diffstat (limited to 'handlePatches.go')
| -rw-r--r-- | handlePatches.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/handlePatches.go b/handlePatches.go index 3a0317c..f270d74 100644 --- a/handlePatches.go +++ b/handlePatches.go @@ -5,6 +5,7 @@ import ( "strings" "go.wit.com/lib/protobuf/forgepb" + "go.wit.com/lib/protobuf/httppb" "go.wit.com/log" ) @@ -33,6 +34,12 @@ func handlePatches(w http.ResponseWriter, r *http.Request, data []byte) error { return nil } +func makePatchesPB(reqPB *httppb.HttpRequest) (*forgepb.Patches, error) { + pb := forgepb.NewPatches() + err := pb.Unmarshal(reqPB.Body) + return pb, err +} + func sendPatchesError(w http.ResponseWriter, r *forgepb.Patches, err error) error { log.Info("send error back to user", err) return nil |
