✨ Improved authentication by checking the jwt in SvelteKit
This commit is contained in:
@@ -2,7 +2,6 @@ import { redirect } from '@sveltejs/kit';
|
||||
|
||||
export const load = async ({ parent }) => {
|
||||
const { email } = await parent();
|
||||
|
||||
if (!email) {
|
||||
throw redirect(302, '/account/login?returnTo=/dashboard');
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
};
|
||||
$: {
|
||||
search_term;
|
||||
console.log(search_term);
|
||||
// console.log(search_term);
|
||||
search();
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user