Skip to content

Commit

Permalink
change unfavorite tool api route:{object_id} to {object_id:path}
Browse files Browse the repository at this point in the history
Tools with `/` in their id couldn't be unfavorited because the URI wouldn't be encoded
  • Loading branch information
ahmedhamidawan committed Mar 8, 2024
1 parent 1e0d665 commit d57341e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/ToolsList/ToolsListTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default {
}
},
async fetchHelp(tool) {
await fetchData(`api/tools/${tool.id}/build`).then((response) => {
await fetchData(`api/tools/${encodeURIComponent(tool.id)}/build`).then((response) => {
const help = response.help;
Vue.set(tool, "_showDetails", false); // maybe not needed
if (help && help != "\n") {
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def set_beacon(
return payload

@router.delete(
"/api/users/{user_id}/favorites/{object_type}/{object_id}",
"/api/users/{user_id}/favorites/{object_type}/{object_id:path}",
name="remove_favorite",
summary="Remove the object from user's favorites",
)
Expand Down

0 comments on commit d57341e

Please sign in to comment.