diff --git a/services/web/frontend/js/features/project-list/util/api.ts b/services/web/frontend/js/features/project-list/util/api.ts index b2adec39a5..d8f9841e4b 100644 --- a/services/web/frontend/js/features/project-list/util/api.ts +++ b/services/web/frontend/js/features/project-list/util/api.ts @@ -42,7 +42,7 @@ export function removeProjectFromTag(tagId: string, projectId: string) { } export function removeProjectsFromTag(tagId: string, projectIds: string[]) { - return deleteJSON(`/tag/${tagId}/projects`, { + return postJSON(`/tag/${tagId}/projects/remove`, { body: { projectIds, }, diff --git a/services/web/test/frontend/features/project-list/components/project-list-root.test.tsx b/services/web/test/frontend/features/project-list/components/project-list-root.test.tsx index eab21bb644..7085c413db 100644 --- a/services/web/test/frontend/features/project-list/components/project-list-root.test.tsx +++ b/services/web/test/frontend/features/project-list/components/project-list-root.test.tsx @@ -682,8 +682,8 @@ describe('', function () { }) it('opens the tags dropdown and remove a tag from selected projects', async function () { - const deleteProjectsFromTagMock = fetchMock.delete( - `express:/tag/:id/projects`, + const deleteProjectsFromTagMock = fetchMock.post( + `express:/tag/:id/projects/remove`, { status: 204, } @@ -702,11 +702,14 @@ describe('', function () { await fetchMock.flush(true) expect( - deleteProjectsFromTagMock.called(`/tag/${this.tagId}/projects`, { - body: { - projectIds: [projectsData[0].id, projectsData[1].id], - }, - }) + deleteProjectsFromTagMock.called( + `/tag/${this.tagId}/projects/remove`, + { + body: { + projectIds: [projectsData[0].id, projectsData[1].id], + }, + } + ) ).to.be.true screen.getByRole('button', { name: `${this.tagName} (0)` }) })