Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 4 additions & 2 deletions src/apis/collectives/collectives.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}

/**
Expand Down
5 changes: 4 additions & 1 deletion src/apis/collectives/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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 },
})
}