add function to apply mutations over grpc
This commit is contained in:
@@ -792,7 +792,18 @@ func (s *PoolServer) Serve(mux *http.ServeMux) {
|
||||
http.Error(w, "Invalid HMAC", http.StatusUnauthorized)
|
||||
return
|
||||
} else {
|
||||
|
||||
cartId, ok := cart.ParseCartId(notification.OriginalReference)
|
||||
log.Printf("Recieved notification event code: %s, %v", notification.EventCode, notification)
|
||||
if ok {
|
||||
host, ok := s.OwnerHost(uint64(cartId))
|
||||
if ok {
|
||||
log.Printf("Not owner of %d, owner: %s", cartId, host.Name())
|
||||
//host.Apply(r.Context(), cartId)
|
||||
} else {
|
||||
log.Printf("I'm the owner of %d", cartId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
w.WriteHeader(http.StatusAccepted)
|
||||
|
||||
Reference in New Issue
Block a user