diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dc2df0d19..75329aaeae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * 🏬 Persist collectives and pages metadata in browser local storage. ### 🐛Fixes +* 🔥 Fix URL to delete a collectives session. * 🪤 Catch missing circles when generating slugs. * 🧹 Remove unused linkHandler mixin. diff --git a/src/apis/collectives/collectives.js b/src/apis/collectives/collectives.js index e198d0fc9b..0413f8e059 100644 --- a/src/apis/collectives/collectives.js +++ b/src/apis/collectives/collectives.js @@ -84,8 +84,10 @@ export function trashCollective(collectiveId) { * @param {boolean} removeCircle - also remove the circle if true */ export function deleteCollective(collectiveId, removeCircle) { - const query = removeCircle ? '?circle=1' : '' - return axios.delete(collectivesTrashApiUrl(collectiveId + query)) + const params = removeCircle ? { circle: 1 } : {} + return axios.delete(collectivesTrashApiUrl(collectiveId), { + params, + }) } /** diff --git a/src/apis/collectives/sessions.js b/src/apis/collectives/sessions.js index 099f27590c..5b2a36d0bd 100644 --- a/src/apis/collectives/sessions.js +++ b/src/apis/collectives/sessions.js @@ -14,6 +14,7 @@ import { apiUrl } from './urls.js' function sessionApiUrl(collectiveId) { return apiUrl('v1.0', 'collectives', collectiveId, 'sessions') } + /** * Create a new session for the current user * @@ -40,5 +41,7 @@ export function updateSession(collectiveId, token) { * @param {string} token - Session token */ export function closeSession(collectiveId, token) { - return axios.delete(sessionApiUrl(`${collectiveId}?token=${token}`)) + return axios.delete(sessionApiUrl(collectiveId), { + params: { token }, + }) }