Fix removing groups that have a slash in the name

Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
Gary Kim 2019-12-04 21:45:33 +08:00
parent b0a7028978
commit 5ae38605ee
No known key found for this signature in database
GPG Key ID: 9349B59FB54594AC
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -320,7 +320,7 @@ const actions = {
*/ */
removeGroup(context, gid) { removeGroup(context, gid) {
return api.requireAdmin().then((response) => { return api.requireAdmin().then((response) => {
return api.delete(OC.linkToOCS(`cloud/groups/${gid}`, 2)) return api.delete(OC.linkToOCS(`cloud/groups/${encodeURIComponent(gid)}`, 2))
.then((response) => context.commit('removeGroup', gid)) .then((response) => context.commit('removeGroup', gid))
.catch((error) => { throw error }) .catch((error) => { throw error })
}).catch((error) => context.commit('API_FAILURE', { gid, error })) }).catch((error) => context.commit('API_FAILURE', { gid, error }))