From 8175f7818a94ba352a1292d464090a141fb026ab Mon Sep 17 00:00:00 2001 From: mgtennant <100305096+mgtennant@users.noreply.github.com> Date: Tue, 21 May 2024 11:46:26 -0700 Subject: [PATCH] codeql update 2 --- backend/src/admin/admin.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/admin/admin.service.ts b/backend/src/admin/admin.service.ts index 681f9786..cd69244d 100644 --- a/backend/src/admin/admin.service.ts +++ b/backend/src/admin/admin.service.ts @@ -256,14 +256,14 @@ export class AdminService { async removeAdmin(username: string): Promise<{ error: string | null }> { const ticdiAdminRole = 'ticdi_admin'; const bearerToken = await this.getToken(); + const url = new URL( + `${process.env.users_api_base_url}/integrations/${process.env.integration_id}/${process.env.css_environment}/users/${username}@idir/roles/${ticdiAdminRole}` + ); try { await axios - .delete( - `${process.env.users_api_base_url}/integrations/${process.env.integration_id}/${process.env.css_environment}/users/${username}@idir/roles/${ticdiAdminRole}`, - { - headers: { Authorization: 'Bearer ' + bearerToken }, - } - ) + .delete(url.href, { + headers: { Authorization: 'Bearer ' + bearerToken }, + }) .then((res) => { return res; })