From 7c363e749db5d985e4778cb6e0fd6ae9539d7f8d Mon Sep 17 00:00:00 2001 From: mgtennant <100305096+mgtennant@users.noreply.github.com> Date: Tue, 21 May 2024 11:51:41 -0700 Subject: [PATCH] codeql 3 --- backend/src/admin/admin.service.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/admin/admin.service.ts b/backend/src/admin/admin.service.ts index cd69244d..889084f7 100644 --- a/backend/src/admin/admin.service.ts +++ b/backend/src/admin/admin.service.ts @@ -256,12 +256,10 @@ 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}` - ); + const 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(url.href, { + .delete(url, { headers: { Authorization: 'Bearer ' + bearerToken }, }) .then((res) => {