Skip to content

Commit bb484fb

Browse files
committed
atob
1 parent 482d29b commit bb484fb

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/routes/[...404]/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import { component$ } from '@builder.io/qwik';
22
import { DocumentHead, Link, routeLoader$ } from '@builder.io/qwik-city';
33

4-
const decode = (str: string):string => Buffer.from(str, 'base64').toString('binary');
5-
64
export const useResults = routeLoader$(async ({ params, redirect }) => {
7-
const url = decode(params['404']);
8-
console.log(params['404']);
5+
const url = atob(params['404']);
96
if (url.startsWith('http')) throw redirect(302, url);
107
});
118

0 commit comments

Comments
 (0)