From be2014cc315e70a68960ece46165b0a08d86fe69 Mon Sep 17 00:00:00 2001 From: Codex Bot Date: Mon, 9 Nov 2026 15:49:58 +0800 Subject: [PATCH] Avoid ambiguous asset metadata and operation receipt routes --- internal/platform/http.go | 2 +- internal/platform/integration_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/platform/http.go b/internal/platform/http.go index 188a8f9..d963638 100644 --- a/internal/platform/http.go +++ b/internal/platform/http.go @@ -151,7 +151,7 @@ func Register(mux *http.ServeMux, db *sql.DB, callbacks map[string]string, origi mux.HandleFunc("/projects/{project}/workspaces/{workspace}/materials", s.protected(callbacks, s.materials)) mux.HandleFunc("/projects/{project}/workspaces/{workspace}/assets", s.protected(callbacks, s.uploadAsset)) mux.HandleFunc("/projects/{project}/workspaces/{workspace}/assets/operations/{request}", s.protected(callbacks, s.assetOperation)) - mux.HandleFunc("/projects/{project}/workspaces/{workspace}/assets/{asset}/metadata", s.protected(callbacks, s.getAssetMetadata)) + mux.HandleFunc("/projects/{project}/workspaces/{workspace}/assets/metadata/{asset}", s.protected(callbacks, s.getAssetMetadata)) mux.HandleFunc("/projects/{project}/workspaces/{workspace}/assets/{asset}", s.protected(callbacks, s.getAsset)) mux.HandleFunc("/projects/{project}/workspaces/{workspace}/materials/{material}", s.protected(callbacks, s.material)) mux.HandleFunc("/projects/{project}/workspaces/{workspace}/materials/{material}/canvas", s.protected(callbacks, s.canvas)) diff --git a/internal/platform/integration_test.go b/internal/platform/integration_test.go index ac79743..edcfce8 100644 --- a/internal/platform/integration_test.go +++ b/internal/platform/integration_test.go @@ -585,7 +585,7 @@ func TestOnboardingAndSharing(t *testing.T) { } } // Metadata discloses the same immutable identity only after a fresh read permission check. - metadataPath := workspacePath + "/assets/" + uploaded["id"].(string) + "/metadata" + metadataPath := workspacePath + "/assets/metadata/" + uploaded["id"].(string) for _, sample := range []struct { token string status int