add function to apply mutations over grpc
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 41s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m50s

This commit is contained in:
matst80
2025-11-28 14:07:43 +01:00
parent 2c0f6c160a
commit 47e69f18a5
12 changed files with 1015 additions and 74 deletions

View File

@@ -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)