Fix frontend endpoint call for http token generation
During the migration of this plugin to Lit. The plugin
endpoint for generating http token was accidentally replaced
with the gerrit core version of the endpoint. The core
endpoint works for admins but not for non-admins.
Change-Id: I9cba3afe571b4899fa2c6094ac631e71eb483b9f
diff --git a/web/gr-serviceuser-http-password.ts b/web/gr-serviceuser-http-password.ts
index 40270f6..3a53103 100644
--- a/web/gr-serviceuser-http-password.ts
+++ b/web/gr-serviceuser-http-password.ts
@@ -120,7 +120,7 @@
this.generatedPassword = 'Generating...';
this.generatedPasswordModal?.showModal();
this.pluginRestApi
- .put<String>(`/a/accounts/${this.serviceUserId}/password.http`, {
+ .put<String>(`/a/config/server/serviceuser~serviceusers/${this.serviceUserId}/password.http`, {
generate: true,
})
.then(newPassword => {
@@ -138,7 +138,7 @@
private handleDelete() {
this.pluginRestApi.delete(
- `/a/accounts/${this.serviceUserId}/password.http`
+ `/a/config/server/serviceuser~serviceusers/${this.serviceUserId}/password.http`
);
}
}