Skip to content

Commit

Permalink
addToPath to prevent multiple param string starting chars (hashicorp#…
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud authored and nvanthao committed Mar 1, 2024
1 parent 5bf13e1 commit 79bf0e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/19139.txt
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fixed an issue where purging a job with a namespace did not process correctly
```
7 changes: 6 additions & 1 deletion ui/app/adapters/job.js
Expand Up @@ -52,7 +52,12 @@ export default class JobAdapter extends WatchableNamespaceIDs {
}

purge(job) {
const url = this.urlForFindRecord(job.get('id'), 'job') + '?purge=true';
const url = addToPath(
this.urlForFindRecord(job.get('id'), 'job'),
'',
'purge=true'
);

return this.ajax(url, 'DELETE');
}

Expand Down

0 comments on commit 79bf0e4

Please sign in to comment.