Check Code Owner Screen: Drop '/a' prefix from REST call With the '/a' prefix the request doesn't work in a browser (fails with '400 Bad Request'). Not sure how this worked when I tested this with a local Gerrit server, but it still works without the '/a' prefix. Bug: Google b/345161989 Change-Id: I50b358cb0e3e5a4a9a0268f600a53c44a3ef3432 Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/web/gr-check-code-owner.ts b/web/gr-check-code-owner.ts index 5919689..e6de8a7 100644 --- a/web/gr-check-code-owner.ts +++ b/web/gr-check-code-owner.ts
@@ -284,7 +284,7 @@ var email = this.emailInput.value.trim(); var path = this.pathInput.value.trim(); - var url = `/a/projects/${encodeURIComponent(project)}/branches/${encodeURIComponent(branch)}/code_owners.check/?email=${encodeURIComponent(email)}&path=${encodeURIComponent(path)}`; + var url = `/projects/${encodeURIComponent(project)}/branches/${encodeURIComponent(branch)}/code_owners.check/?email=${encodeURIComponent(email)}&path=${encodeURIComponent(path)}`; if (this.userInput.value) { url = url + `&user=${encodeURIComponent(this.userInput.value.trim())}` }