improve app setup
This commit is contained in:
@@ -0,0 +1 @@
|
||||
-- Add down migration script here
|
||||
1143
backend/migrations/20230327115727_update_app_setup.up.sql
Normal file
1143
backend/migrations/20230327115727_update_app_setup.up.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,11 @@
|
||||
const rd = $page.url.searchParams.get('rd')
|
||||
|
||||
onMount(async () => {
|
||||
await clearUser()
|
||||
try {
|
||||
await clearUser()
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
goto(rd ?? '/user/login')
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if (status == '401') {
|
||||
const url = $page.url
|
||||
console.log('UNAUTHORIZED', url, url.href.replace(url.origin, ''))
|
||||
if (url.pathname != '/user/login') {
|
||||
if (url.pathname != '/user/login' && url.pathname != '/user/logout') {
|
||||
logoutWithRedirect(url.href.replace(url.origin, ''))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user