Skip to content

Commit

Permalink
fix: decode queue name to support url special chars, closes #375
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Feb 5, 2022
1 parent 0b51e67 commit 7981d4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/api/src/handlers/queues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ async function getAppQueues(
): Promise<AppQueue[]> {
return Promise.all(
pairs.map(async ([queueName, queue]) => {
const isActiveQueue = query.activeQueue === queueName;
const isActiveQueue = decodeURIComponent(query.activeQueue) === queueName;
console.log({ isActiveQueue }, queueName);
console.log({ status: query.status });

const status =
!isActiveQueue || query.status === 'latest' ? allStatuses : [query.status as JobStatus];
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/hooks/useActiveQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export function useActiveQueue(): string | undefined {
strict: true,
});

return match?.params.name;
return decodeURIComponent(match?.params.name || '') || undefined;
}

0 comments on commit 7981d4d

Please sign in to comment.